db/simple/Directory: add method IsReallyAFile()
This commit is contained in:
parent
5dc7cb87bb
commit
2038620bc4
@ -111,6 +111,15 @@ public:
|
||||
return new Directory(std::string(), nullptr);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this really a regular file which is being treated like a
|
||||
* directory?
|
||||
*/
|
||||
bool IsReallyAFile() const noexcept {
|
||||
return device == DEVICE_INARCHIVE ||
|
||||
device == DEVICE_CONTAINER;
|
||||
}
|
||||
|
||||
bool IsMount() const noexcept {
|
||||
return mounted_database != nullptr;
|
||||
}
|
||||
|
@ -59,8 +59,7 @@ DirectoryExists(Storage &storage, const Directory &directory) noexcept
|
||||
return false;
|
||||
}
|
||||
|
||||
return directory.device == DEVICE_INARCHIVE ||
|
||||
directory.device == DEVICE_CONTAINER
|
||||
return directory.IsReallyAFile()
|
||||
? info.IsRegular()
|
||||
: info.IsDirectory();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user