Fix downloady.is_special_file.
This commit is contained in:
parent
c709a28d08
commit
4aed87b522
1 changed files with 6 additions and 2 deletions
|
@ -379,8 +379,12 @@ def get_permission(prompt='y/n\n>', affirmative=['y', 'yes']):
|
||||||
return permission.lower() in affirmative
|
return permission.lower() in affirmative
|
||||||
|
|
||||||
def is_special_file(file):
|
def is_special_file(file):
|
||||||
file = pathclass.Path(file)
|
if isinstance(file, pathclass.Path):
|
||||||
return os.path.normcase(file.basename) in SPECIAL_FILENAMES
|
return False
|
||||||
|
file = pathclass.normalize_sep(file)
|
||||||
|
file = file.rsplit(os.sep)[-1]
|
||||||
|
file = os.path.normcase(file)
|
||||||
|
return file in SPECIAL_FILENAMES
|
||||||
|
|
||||||
def request(method, url, stream=False, headers=None, timeout=TIMEOUT, verify_ssl=True, **kwargs):
|
def request(method, url, stream=False, headers=None, timeout=TIMEOUT, verify_ssl=True, **kwargs):
|
||||||
if headers is None:
|
if headers is None:
|
||||||
|
|
Loading…
Reference in a new issue