aboutsummaryrefslogtreecommitdiffstats
path: root/src/UpdateWalk.cxx
diff options
context:
space:
mode:
authorDenis Krjuchkov <denis@crazydev.net>2013-12-05 03:53:43 +0600
committerDenis Krjuchkov <denis@crazydev.net>2013-12-05 03:53:43 +0600
commit0a6c4c31b2a9e79c9c0119202f9e50e123f98ac6 (patch)
treeeeea8005badbf5b9c8ccea8b961ea498d2da3d47 /src/UpdateWalk.cxx
parent02fcf184b5620c9ccbbc26024f9b0f341061a39a (diff)
downloadmpd-0a6c4c31b2a9e79c9c0119202f9e50e123f98ac6.tar.gz
mpd-0a6c4c31b2a9e79c9c0119202f9e50e123f98ac6.tar.xz
mpd-0a6c4c31b2a9e79c9c0119202f9e50e123f98ac6.zip
fs/Traits: split PathTraits type into PathTraitsFS and PathTraitsUTF8
Diffstat (limited to 'src/UpdateWalk.cxx')
-rw-r--r--src/UpdateWalk.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/UpdateWalk.cxx b/src/UpdateWalk.cxx
index 26f96957e..811978d52 100644
--- a/src/UpdateWalk.cxx
+++ b/src/UpdateWalk.cxx
@@ -290,7 +290,7 @@ skip_symlink(const Directory *directory, const char *utf8_name)
const char *target_str = target.c_str();
- if (PathTraits::IsAbsoluteFS(target_str)) {
+ if (PathTraitsFS::IsAbsolute(target_str)) {
/* if the symlink points to an absolute path, see if
that path is inside the music directory */
const char *relative = map_to_relative_path(target_str);
@@ -301,7 +301,7 @@ skip_symlink(const Directory *directory, const char *utf8_name)
const char *p = target_str;
while (*p == '.') {
- if (p[1] == '.' && PathTraits::IsSeparatorFS(p[2])) {
+ if (p[1] == '.' && PathTraitsFS::IsSeparator(p[2])) {
/* "../" moves to parent directory */
directory = directory->parent;
if (directory == nullptr) {
@@ -311,7 +311,7 @@ skip_symlink(const Directory *directory, const char *utf8_name)
return !follow_outside_symlinks;
}
p += 3;
- } else if (PathTraits::IsSeparatorFS(p[1]))
+ } else if (PathTraitsFS::IsSeparator(p[1]))
/* eliminate "./" */
p += 2;
else
@@ -454,7 +454,7 @@ update_uri(const char *uri)
if (parent == nullptr)
return;
- const char *name = PathTraits::GetBaseUTF8(uri);
+ const char *name = PathTraitsUTF8::GetBase(uri);
struct stat st;
if (!skip_symlink(parent, name) &&