From f216a3b7de3f68e20bfd1b3bda86b384007aefcb Mon Sep 17 00:00:00 2001 From: Thomas Guymer Date: Mon, 23 Dec 2024 12:19:27 +0000 Subject: [PATCH] pass "follow_symlinks" --- pyguymer3/perms.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pyguymer3/perms.py b/pyguymer3/perms.py index 8aafcbb..0583405 100644 --- a/pyguymer3/perms.py +++ b/pyguymer3/perms.py @@ -116,7 +116,11 @@ 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"]): @@ -124,4 +128,8 @@ def perms( 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, + )