Private GIT

Skip to content
Snippets Groups Projects
Commit 330288cc authored by Patrick Vos's avatar Patrick Vos
Browse files

stat only when necessary

parent e2ee043f
No related branches found
No related tags found
No related merge requests found
......@@ -479,14 +479,13 @@ def fixSetGroupID(childPath):
if os.name == 'nt' or os.name == 'ce':
return
childStat = ek.ek(os.stat, childPath)
parentPath = ek.ek(os.path.dirname, childPath)
parentStat = os.stat(parentPath)
parentMode = stat.S_IMODE(parentStat[stat.ST_MODE])
if parentMode & stat.S_ISGID:
parentGID = parentStat[stat.ST_GID]
childStat = ek.ek(os.stat, childPath)
childGID = childStat[stat.ST_GID]
if childGID == parentGID:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment