diff --git a/CHANGES.md b/CHANGES.md index 0c3f992..041fa6c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # XRLint Change History +## Version 0.4.1 (in development) + +- Fixed an issue that prevented recursively traversing folders referred + to by URLs (such as `s3:////`) rather than local directory + paths. (#39) + ## Version 0.4.0 (from 2025-01-27) - Fixed and enhanced core rule `time-coordinate`. `(#33) diff --git a/xrlint/cli/engine.py b/xrlint/cli/engine.py index 1efb8c3..33366fa 100644 --- a/xrlint/cli/engine.py +++ b/xrlint/cli/engine.py @@ -175,6 +175,7 @@ def compute_config(p: str): for file_path in file_paths: _fs, root = fsspec.url_to_fs(file_path) fs: fsspec.AbstractFileSystem = _fs + is_local = isinstance(fs, fsspec.implementations.local.LocalFileSystem) config = compute_config(file_path) if config is not None: @@ -185,6 +186,7 @@ def compute_config(p: str): for path, dirs, files in fs.walk(root, topdown=True): for d in list(dirs): d_path = f"{path}/{d}" + d_path = d_path if is_local else fs.unstrip_protocol(d_path) c = compute_config(d_path) if c is not None: dirs.remove(d) @@ -192,6 +194,7 @@ def compute_config(p: str): for f in files: f_path = f"{path}/{f}" + f_path = f_path if is_local else fs.unstrip_protocol(f_path) c = compute_config(f_path) if c is not None: yield f_path, c diff --git a/xrlint/version.py b/xrlint/version.py index 5140fa1..4407edf 100644 --- a/xrlint/version.py +++ b/xrlint/version.py @@ -1 +1 @@ -version = "0.4.0" +version = "0.4.1.dev0"