fixed wrong permissions on directory creation
This commit is contained in:
@@ -87,17 +87,20 @@ else:
|
|||||||
domain = http.client.HTTPConnection(konachan)
|
domain = http.client.HTTPConnection(konachan)
|
||||||
|
|
||||||
# chdir in $path and create directory if it not exists
|
# chdir in $path and create directory if it not exists
|
||||||
|
|
||||||
|
dir_tags = tags.replace(":", "_")
|
||||||
|
|
||||||
if not os.path.isdir(path.rstrip()):
|
if not os.path.isdir(path.rstrip()):
|
||||||
os.makedirs(path.rstrip(), 0o755, True)
|
os.makedirs(path.rstrip(), 0o755, True)
|
||||||
os.chdir(path.rstrip())
|
os.chdir(path.rstrip())
|
||||||
if safemode == "yes":
|
if safemode == "yes":
|
||||||
if not os.path.isdir("Safemode: Tags: " + tags):
|
if not os.path.isdir("Safemode Tags " + dir_tags):
|
||||||
os.makedirs("Safemode: Tags: " + tags, 0o7555, True)
|
os.makedirs("Safemode Tags " + dir_tags, 0o755, True)
|
||||||
os.chdir("Safemode: Tags: " + tags)
|
os.chdir("Safemode Tags " + dir_tags)
|
||||||
else:
|
else:
|
||||||
if not os.path.isdir("Tags: " + tags):
|
if not os.path.isdir("Tags " + dir_tags):
|
||||||
os.makedirs("Tags: " + tags, 0o755, True)
|
os.makedirs("Tags " + dir_tags, 0o755, True)
|
||||||
os.chdir("Tags: " + tags)
|
os.chdir("Tags " + dir_tags)
|
||||||
|
|
||||||
|
|
||||||
# creating directory for pics
|
# creating directory for pics
|
||||||
|
|||||||
Reference in New Issue
Block a user