File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ def _is_url(path_or_url: str) -> bool:
6666 return result
6767
6868
69- def system_path_filter (_func = None , arg_slice : Optional [slice ] = None ):
69+ def _system_path_filter (_func = None , arg_slice : Optional [slice ] = None ):
7070 """Filters function arguments to account for platform path separators.
7171 Optional slicing range can be specified to select specific arguments
7272
@@ -100,6 +100,16 @@ def path_filter_caller(*args, **kwargs):
100100 return holder_func
101101
102102
103+ def _noop_decorator (_func = None , arg_slice : Optional [slice ] = None ):
104+ return _func if _func else lambda x : x
105+
106+
107+ if sys .platform == "win32" :
108+ system_path_filter = _system_path_filter
109+ else :
110+ system_path_filter = _noop_decorator
111+
112+
103113def sanitize_win_longpath (path : str ) -> str :
104114 """Strip Windows extended path prefix from strings
105115 Returns sanitized string.
You can’t perform that action at this time.
0 commit comments