summaryrefslogtreecommitdiff
path: root/src/storage
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-09-17 14:43:05 +0200
committerMax Kellermann <max@musicpd.org>2020-09-17 14:44:20 +0200
commit0acc398c52bd668a41507993ac0f01949345dd20 (patch)
treec520e11e615f20f034e5379a704bc0cf0911d4ac /src/storage
parente8380cf2aa9ff7517d5ea3ada33a40df09d8542c (diff)
parent4c1cfca95b8a6dd2c0d9a7b6df065912eb8b4231 (diff)
Merge branch 'v0.21.x' into master
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/plugins/NfsStorage.cxx4
-rw-r--r--src/storage/plugins/SmbclientStorage.cxx6
2 files changed, 3 insertions, 7 deletions
diff --git a/src/storage/plugins/NfsStorage.cxx b/src/storage/plugins/NfsStorage.cxx
index a93ccefb9..fbe18e96b 100644
--- a/src/storage/plugins/NfsStorage.cxx
+++ b/src/storage/plugins/NfsStorage.cxx
@@ -305,9 +305,7 @@ gcc_pure
static bool
SkipNameFS(PathTraitsFS::const_pointer name) noexcept
{
- return name[0] == '.' &&
- (name[1] == 0 ||
- (name[1] == '.' && name[2] == 0));
+ return PathTraitsFS::IsSpecialFilename(name);
}
static void
diff --git a/src/storage/plugins/SmbclientStorage.cxx b/src/storage/plugins/SmbclientStorage.cxx
index e62c95902..390cb8c4a 100644
--- a/src/storage/plugins/SmbclientStorage.cxx
+++ b/src/storage/plugins/SmbclientStorage.cxx
@@ -151,11 +151,9 @@ SmbclientStorage::OpenDirectory(std::string_view uri_utf8)
gcc_pure
static bool
-SkipNameFS(const char *name) noexcept
+SkipNameFS(PathTraitsFS::const_pointer name) noexcept
{
- return name[0] == '.' &&
- (name[1] == 0 ||
- (name[1] == '.' && name[2] == 0));
+ return PathTraitsFS::IsSpecialFilename(name);
}
SmbclientDirectoryReader::~SmbclientDirectoryReader()