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