mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 13:53:15 -07:00
fix subdir permissions. Fixes #609
This commit is contained in:
parent
9b28fff338
commit
7b2c0c21ee
1 changed files with 2 additions and 2 deletions
|
@ -140,12 +140,12 @@ def extract(filePath, outputDestination):
|
||||||
if success:
|
if success:
|
||||||
# sleep to let files finish writing to disk
|
# sleep to let files finish writing to disk
|
||||||
sleep (3)
|
sleep (3)
|
||||||
perms = oct(stat.S_IMODE(os.lstat(filePath).st_mode))
|
perms = oct(stat.S_IMODE(os.lstat(os.path.split(filePath)[0]).st_mode))
|
||||||
for dir, subdirs, files in os.walk(outputDestination):
|
for dir, subdirs, files in os.walk(outputDestination):
|
||||||
for subdir in subdirs:
|
for subdir in subdirs:
|
||||||
if not os.path.join(dir, subdir) in origFiles:
|
if not os.path.join(dir, subdir) in origFiles:
|
||||||
try:
|
try:
|
||||||
os.chmod(os.path.join(dir, file), perms)
|
os.chmod(os.path.join(dir, subdir), perms)
|
||||||
except: pass
|
except: pass
|
||||||
for file in files:
|
for file in files:
|
||||||
if not os.path.join(dir, file) in origFiles:
|
if not os.path.join(dir, file) in origFiles:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue