diff --git a/sickbeard/helpers.py b/sickbeard/helpers.py index 26b5a0aec25ff9f4f8e814315b918f33557e6250..fe15f88017c3ded387db7ca6c8898d1b6ee2af76 100644 --- a/sickbeard/helpers.py +++ b/sickbeard/helpers.py @@ -436,12 +436,16 @@ def chmodAsParent(childPath): return parentMode = stat.S_IMODE(os.stat(parentPath)[stat.ST_MODE]) + childPath_mode = stat.S_IMODE(os.stat(childPath)[stat.ST_MODE]) if ek.ek(os.path.isfile, childPath): childMode = fileBitFilter(parentMode) else: childMode = parentMode + if childPath_mode == childMode: + return + try: ek.ek(os.chmod, childPath, childMode) logger.log(u"Setting permissions for %s to %o as parent directory has %o" % (childPath, childMode, parentMode), logger.DEBUG)