Revert "convert: playlist: Debug commit: Learn syspath()"

This reverts commit 8a7519e5057e9c11a5f95c979b2fd5ac6c1fd9e2.
This commit is contained in:
J0J0 T 2022-08-28 13:26:06 +02:00 committed by J0J0 Todos
parent bd5335f31f
commit b3d0c1cc1c

View file

@ -409,17 +409,11 @@ def syspath(path, prefix=True):
# reported as the FS encoding by Windows. Try both.
try:
path = path.decode('utf-8')
print("syspath: this is path:")
print(path)
except UnicodeError:
# The encoding should always be MBCS, Windows' broken
# Unicode representation.
encoding = sys.getfilesystemencoding() or sys.getdefaultencoding()
path = path.decode(encoding, 'replace')
print("syspath: this is encoding:")
print(encoding)
print("syspath: this is path:")
print(path)
# Add the magic prefix if it isn't already there.
# https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247.aspx