fix: Join music file path safely.

This commit is contained in:
Terry Geng 2021-04-07 15:17:38 +08:00
parent e5f623f6c3
commit 384bacf1ef
No known key found for this signature in database
GPG Key ID: F982F8EA1DF720E7

View File

@ -51,7 +51,7 @@ def get_recursive_file_list_sorted(path):
try:
mime = magic.from_file(fullpath, mime=True)
if 'audio' in mime or 'audio' in magic.from_file(fullpath).lower() or 'video' in mime:
filelist.append(relroot + file)
filelist.append(os.path.join(relroot, file))
except:
pass