Merge pull request #7487 from Kaskadee/bugfix/null-check-resultdacl

Fix crash on setting folder permission on non-NTFS file systems on Windows
This commit is contained in:
Matthieu Gallien 2024-11-15 09:28:19 +01:00 committed by GitHub
commit f6921ca8ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -371,7 +371,7 @@ bool FileSystem::setFolderPermissions(const QString &path,
qCWarning(lcFileSystem) << "error when calling GetSecurityDescriptorDacl" << path << GetLastError();
return false;
}
if (!daclPresent) {
if (!daclPresent || !resultDacl) {
qCWarning(lcFileSystem) << "error when calling DACL needed to set a folder read-only or read-write is missing" << path;
return false;
}