From 49a8fcd6020085c8c75c43a4fa17f53eb482212a Mon Sep 17 00:00:00 2001 From: BecoKo Date: Sat, 28 Dec 2024 18:27:00 +0200 Subject: [PATCH] Update ntpath.py - WinFSP giving WinError 1005 - The volume does not contain a recognized file system Make os.path.realpath to ignore WinError 1005 in non-strict mode. Issue: https://github.com/cryptomator/cryptomator/issues/2359 --- Lib/ntpath.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 0246419485da0d..833fcf21a850ad 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -638,9 +638,10 @@ def _getfinalpathname_nonstrict(path): # 87: ERROR_INVALID_PARAMETER # 123: ERROR_INVALID_NAME # 161: ERROR_BAD_PATHNAME + # 1005: ERROR_UNRECOGNIZED_VOLUME # 1920: ERROR_CANT_ACCESS_FILE # 1921: ERROR_CANT_RESOLVE_FILENAME (implies unfollowable symlink) - allowed_winerror = 1, 2, 3, 5, 21, 32, 50, 53, 65, 67, 87, 123, 161, 1920, 1921 + allowed_winerror = 1, 2, 3, 5, 21, 32, 50, 53, 65, 67, 87, 123, 161, 1005, 1920, 1921 # Non-strict algorithm is to find as much of the target directory # as we can and join the rest.