command/file, storage/{nfs,smbclient}: use PathTraitsFS::IsSpecialFilename()
Eliminate some duplicate code.
This commit is contained in:
parent
b18fc3a8d0
commit
e907ff43ae
@ -50,9 +50,7 @@ gcc_pure
|
|||||||
static bool
|
static bool
|
||||||
SkipNameFS(PathTraitsFS::const_pointer_type name_fs) noexcept
|
SkipNameFS(PathTraitsFS::const_pointer_type name_fs) noexcept
|
||||||
{
|
{
|
||||||
return name_fs[0] == '.' &&
|
return PathTraitsFS::IsSpecialFilename(name_fs);
|
||||||
(name_fs[1] == 0 ||
|
|
||||||
(name_fs[1] == '.' && name_fs[2] == 0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gcc_pure
|
gcc_pure
|
||||||
|
@ -307,9 +307,7 @@ gcc_pure
|
|||||||
static bool
|
static bool
|
||||||
SkipNameFS(PathTraitsFS::const_pointer_type name) noexcept
|
SkipNameFS(PathTraitsFS::const_pointer_type name) noexcept
|
||||||
{
|
{
|
||||||
return name[0] == '.' &&
|
return PathTraitsFS::IsSpecialFilename(name);
|
||||||
(name[1] == 0 ||
|
|
||||||
(name[1] == '.' && name[2] == 0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -144,11 +144,9 @@ SmbclientStorage::OpenDirectory(const char *uri_utf8)
|
|||||||
|
|
||||||
gcc_pure
|
gcc_pure
|
||||||
static bool
|
static bool
|
||||||
SkipNameFS(const char *name) noexcept
|
SkipNameFS(PathTraitsFS::const_pointer_type name) noexcept
|
||||||
{
|
{
|
||||||
return name[0] == '.' &&
|
return PathTraitsFS::IsSpecialFilename(name);
|
||||||
(name[1] == 0 ||
|
|
||||||
(name[1] == '.' && name[2] == 0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SmbclientDirectoryReader::~SmbclientDirectoryReader()
|
SmbclientDirectoryReader::~SmbclientDirectoryReader()
|
||||||
|
Loading…
Reference in New Issue
Block a user