Skip to content

Commit

Permalink
Fix @boegel's remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
geimer committed Oct 27, 2015
1 parent 06abf77 commit 31b2a54
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions easybuild/tools/filetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,15 +701,16 @@ def adjust_permissions(name, permissionBits, add=True, onlyfiles=False, onlydirs
paths = []
if not onlydirs:
if not skip_symlinks:
paths += files
paths.extend(files)
else:
for path in files:
fname = os.path.join(root, path)
if not os.path.islink(fname):
if not os.path.islink(os.path.join(root, path)):
paths.append(path)
else:
_log.debug("Not adjusting permissions for symlink %s", path)
if not onlyfiles:
# os.walk skips symlinked dirs by default, i.e., no special handling needed here
paths += dirs
paths.extend(dirs)

for path in paths:
allpaths.append(os.path.join(root, path))
Expand Down

0 comments on commit 31b2a54

Please sign in to comment.