fs: fix long path handling for ResetPermissions, ClearAttributes and security descriptors

This commit is contained in:
Michael Eischer
2024-07-29 20:10:58 +02:00
parent 76d56e24d6
commit 62c4a5e9a0
3 changed files with 6 additions and 6 deletions

View File

@@ -134,7 +134,7 @@ func IsAccessDenied(err error) bool {
// ResetPermissions resets the permissions of the file at the specified path
func ResetPermissions(path string) error {
// Set the default file permissions
if err := os.Chmod(path, 0600); err != nil {
if err := os.Chmod(fixpath(path), 0600); err != nil {
return err
}
return nil