From 5f5be52a89de30442efede8fe3a948ba0c84bdc9 Mon Sep 17 00:00:00 2001 From: J0J0 T Date: Sat, 27 Aug 2022 19:32:59 +0200 Subject: [PATCH] convert: playlist: Debug commit: Learn syspath() Learn what's happening in syspath(). --- beets/util/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/beets/util/__init__.py b/beets/util/__init__.py index 2319890a3..70ba7b996 100644 --- a/beets/util/__init__.py +++ b/beets/util/__init__.py @@ -409,11 +409,17 @@ 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