mirror of
https://github.com/evilhero/mylar
synced 2024-12-23 16:22:45 +00:00
FIX:(#356) Folder permissions when created by Mylar
This commit is contained in:
parent
5d624ed0db
commit
5a1b9d438e
1 changed files with 4 additions and 1 deletions
|
@ -21,6 +21,7 @@ import subprocess
|
|||
import re
|
||||
import logger
|
||||
import mylar
|
||||
import sys
|
||||
|
||||
def file2comicmatch(watchmatch):
|
||||
#print ("match: " + str(watchmatch))
|
||||
|
@ -127,7 +128,9 @@ def validateAndCreateDirectory(dir, create=False):
|
|||
if dir.strip():
|
||||
logger.info("Creating comic directory ("+str(mylar.CHMOD_DIR)+") : " + dir)
|
||||
try:
|
||||
os.makedirs(dir, mode=int(mylar.CHMOD_DIR))
|
||||
permission = int(mylar.CHMOD_DIR, 8)
|
||||
os.umask(0) # this is probably redudant, but it doesn't hurt to clear the umask here.
|
||||
os.makedirs(str(dir), permission )
|
||||
except OSError:
|
||||
raise SystemExit('Could not create data directory: ' + mylar.DATA_DIR + '. Exiting....')
|
||||
return True
|
||||
|
|
Loading…
Reference in a new issue