command/file, storage/{nfs,smbclient}: use PathTraitsFS::IsSpecialFilename()

Eliminate some duplicate code.
This commit is contained in:
Max Kellermann
2020-09-16 20:57:37 +02:00
parent b18fc3a8d0
commit e907ff43ae
3 changed files with 4 additions and 10 deletions

View File

@@ -50,9 +50,7 @@ gcc_pure
static bool
SkipNameFS(PathTraitsFS::const_pointer_type name_fs) noexcept
{
return name_fs[0] == '.' &&
(name_fs[1] == 0 ||
(name_fs[1] == '.' && name_fs[2] == 0));
return PathTraitsFS::IsSpecialFilename(name_fs);
}
gcc_pure