Skip to content

Commit

Permalink
Add null check for resultDacl after calling GetSecurityDescriptorDacl
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Creutz <[email protected]>
  • Loading branch information
Kaskadee authored and mgallien committed Nov 15, 2024
1 parent 65d4311 commit 0f85a0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsync/filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0f85a0b

Please sign in to comment.