Merge remote-tracking branch 'origin/9.0' into 10.0

Change-Id: I7e171601cd7317b48d5074bbc0ead127813d596c
This commit is contained in:
David Schulz
2023-02-01 08:16:30 +01:00
5 changed files with 55 additions and 21 deletions

View File

@@ -1044,6 +1044,19 @@ QByteArray UnixDeviceFileAccess::fileId(const FilePath &filePath) const
FilePathInfo UnixDeviceFileAccess::filePathInfo(const FilePath &filePath) const
{
if (filePath.path() == "/") // TODO: Add FilePath::isRoot()
{
const FilePathInfo r{4096,
FilePathInfo::FileFlags(
FilePathInfo::ReadOwnerPerm | FilePathInfo::WriteOwnerPerm
| FilePathInfo::ExeOwnerPerm | FilePathInfo::ReadGroupPerm
| FilePathInfo::ExeGroupPerm | FilePathInfo::ReadOtherPerm
| FilePathInfo::ExeOtherPerm | FilePathInfo::DirectoryType
| FilePathInfo::LocalDiskFlag | FilePathInfo::ExistsFlag),
QDateTime::currentDateTime()};
return r;
}
const RunResult stat = runInShell(
{"stat", {"-L", "-c", "%f %Y %s", filePath.path()}, OsType::OsTypeLinux});
return FileUtils::filePathInfoFromTriple(QString::fromLatin1(stat.stdOut));