fix: extension + file permissions
This commit is contained in:
0
botlib/__init__.py
Executable file → Normal file
0
botlib/__init__.py
Executable file → Normal file
0
botlib/cli.py
Executable file → Normal file
0
botlib/cli.py
Executable file → Normal file
0
botlib/cron.py
Executable file → Normal file
0
botlib/cron.py
Executable file → Normal file
4
botlib/curl.py
Executable file → Normal file
4
botlib/curl.py
Executable file → Normal file
@@ -184,7 +184,9 @@ class Curl:
|
|||||||
if not parts:
|
if not parts:
|
||||||
raise URLError('URL not valid: "{}"'.format(url_str))
|
raise URLError('URL not valid: "{}"'.format(url_str))
|
||||||
|
|
||||||
ext = parts.path.split('.')[-1] or 'unknown'
|
ext = parts.path.split('.')[-1]
|
||||||
|
if not ext or len(ext) > 4:
|
||||||
|
ext = 'unknown'
|
||||||
file_path = os.path.join(dest_dir, fname + '.' + ext)
|
file_path = os.path.join(dest_dir, fname + '.' + ext)
|
||||||
if override or not os.path.isfile(file_path):
|
if override or not os.path.isfile(file_path):
|
||||||
url = parts.geturl()
|
url = parts.geturl()
|
||||||
|
|||||||
0
botlib/helper.py
Executable file → Normal file
0
botlib/helper.py
Executable file → Normal file
0
botlib/oncedb.py
Executable file → Normal file
0
botlib/oncedb.py
Executable file → Normal file
0
botlib/tgclient.py
Executable file → Normal file
0
botlib/tgclient.py
Executable file → Normal file
Reference in New Issue
Block a user