Skip to content

Commit

Permalink
On Windows, sanitise UNC root paths for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-traverse committed Jul 11, 2024
1 parent 56f0968 commit c5b35ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tracdap-runtime/python/src/tracdap/rt/_impl/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ def __init__(self, storage_key: str, storage_config: _cfg.PluginConfig, fs: pa_f
fs_impl = "arrow"
fs_root = fs.base_path

# On Windows, sanitise UNC root paths for logging
if _util.is_windows() and fs_root.startswith("//?/"):
fs_root = fs_root[4:]

# If this is an FSSpec implementation, take the protocol from FSSpec as the FS type
base_fs = fs.base_fs
if isinstance(base_fs, pa_fs.PyFileSystem):
Expand Down

0 comments on commit c5b35ae

Please sign in to comment.