Merge pull request #1622 from croneter/py3-fix-recursion

Fix RecursionError if a video lies in a root directory
This commit is contained in:
croneter 2021-09-11 16:58:49 +02:00 committed by GitHub
commit b6cc7d0ab1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,10 +31,8 @@ def append_os_sep(path):
Appends either a '\\' or '/' - IRRELEVANT of the host OS!! (os.path.join is Appends either a '\\' or '/' - IRRELEVANT of the host OS!! (os.path.join is
dependant on the host OS) dependant on the host OS)
""" """
if '/' in path: separator = '/' if '/' in path else '\\'
return path + '/' return path if path.endswith(separator) else path + separator
else:
return path + '\\'
def translate_path(path): def translate_path(path):