From 9025b6e144d2be74ce65118c67e2592e86502a09 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 10 Oct 2023 11:17:12 +0200 Subject: Call remap on dirnames from os.walk() as well as filenames. Strangely it includes symlinks that point to directories. --- perm_offset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perm_offset.py b/perm_offset.py index 189728c..0ed452c 100755 --- a/perm_offset.py +++ b/perm_offset.py @@ -66,6 +66,6 @@ for tgt in args.targets: remap_file(dirpath, args.src_start, args.dst_start, args.count, args.dry_run) - for fn in filenames: + for fn in dirnames + filenames: remap_file(os.path.join(dirpath, fn), args.src_start, args.dst_start, args.count, args.dry_run) -- cgit v1.2.3