From 6e5dac46bb50093bfa339f52fc15ac36233b5b62 Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 11 Sep 2021 16:47:28 +0200 Subject: [PATCH] Fix RecursionError if videos lie in a root directory --- resources/lib/path_ops.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/resources/lib/path_ops.py b/resources/lib/path_ops.py index 7dd81dfd..a0c99be0 100644 --- a/resources/lib/path_ops.py +++ b/resources/lib/path_ops.py @@ -31,10 +31,8 @@ def append_os_sep(path): Appends either a '\\' or '/' - IRRELEVANT of the host OS!! (os.path.join is dependant on the host OS) """ - if '/' in path: - return path + '/' - else: - return path + '\\' + separator = '/' if '/' in path else '\\' + return path if path.endswith(separator) else path + separator def translate_path(path):