Skip to content

Commit

Permalink
pass "follow_symlinks"
Browse files Browse the repository at this point in the history
  • Loading branch information
Guymer committed Dec 23, 2024
1 parent d4dbb7a commit f216a3b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pyguymer3/perms.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,20 @@ def perms(
if stat.S_IMODE(info["st_mode"]) != filePerms:
if debug:
print(f'INFO: Changing file permissions of \"{name}\" to \"{oct(filePerms)}\" (it is \"{oct(stat.S_IMODE(info["st_mode"]))}\").')
os.chmod(name, filePerms)
os.chmod(
name,
filePerms,
follow_symlinks = follow_symlinks,
)

# Set folder permissions if it is wrong ...
if stat.S_ISDIR(info["st_mode"]):
if folderPerms is not None:
if stat.S_IMODE(info["st_mode"]) != folderPerms:
if debug:
print(f'INFO: Changing folder permissions of \"{name}\" to \"{oct(folderPerms)}\" (it is \"{oct(stat.S_IMODE(info["st_mode"]))}\").')
os.chmod(name, folderPerms)
os.chmod(
name,
folderPerms,
follow_symlinks = follow_symlinks,
)

0 comments on commit f216a3b

Please sign in to comment.