python-fsutil 0.16.0__tar.gz → 0.16.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_fsutil-0.16.0/src/python_fsutil.egg-info → python_fsutil-0.16.1}/PKG-INFO +1 -1
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/fsutil/metadata.py +1 -1
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/fsutil/operations.py +3 -1
- {python_fsutil-0.16.0 → python_fsutil-0.16.1/src/python_fsutil.egg-info}/PKG-INFO +1 -1
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/tests/test_operations.py +18 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/LICENSE.txt +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/MANIFEST.in +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/README.md +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/pyproject.toml +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/setup.cfg +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/setup.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/fsutil/__init__.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/fsutil/archives.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/fsutil/args.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/fsutil/checks.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/fsutil/converters.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/fsutil/deps.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/fsutil/info.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/fsutil/io.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/fsutil/paths.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/fsutil/perms.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/fsutil/py.typed +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/fsutil/types.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/python_fsutil.egg-info/SOURCES.txt +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/python_fsutil.egg-info/dependency_links.txt +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/python_fsutil.egg-info/top_level.txt +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/tests/__init__.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/tests/conftest.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/tests/test_archives.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/tests/test_args.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/tests/test_checks.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/tests/test_converters.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/tests/test_deps.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/tests/test_info.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/tests/test_io.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/tests/test_metadata.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/tests/test_paths.py +0 -0
- {python_fsutil-0.16.0 → python_fsutil-0.16.1}/tests/test_perms.py +0 -0
|
@@ -518,7 +518,9 @@ def _search_paths(path: PathIn, pattern: str) -> list[str]:
|
|
|
518
518
|
pathname = os.path.join(path, pattern)
|
|
519
519
|
paths = glob.glob(pathname, recursive=True)
|
|
520
520
|
# normalize paths to use OS-specific separators
|
|
521
|
-
paths = [
|
|
521
|
+
paths = [
|
|
522
|
+
os.path.relpath(os.path.normpath(path_result), path) for path_result in paths
|
|
523
|
+
]
|
|
522
524
|
return paths
|
|
523
525
|
|
|
524
526
|
|
|
@@ -518,6 +518,24 @@ def test_search_files(temp_path):
|
|
|
518
518
|
assert results == expected_results
|
|
519
519
|
|
|
520
520
|
|
|
521
|
+
def test_search_files_with_relative_path(temp_path, monkeypatch):
|
|
522
|
+
"""
|
|
523
|
+
Regression test: search_files with a relative path must not return an empty
|
|
524
|
+
list due to the double-prefix bug in _filter_paths.
|
|
525
|
+
"""
|
|
526
|
+
fsutil.create_file(temp_path("a/b/c/IMG_1002.png"))
|
|
527
|
+
fsutil.create_file(temp_path("a/x/c/IMG_1005.png"))
|
|
528
|
+
fsutil.create_file(temp_path("a/b/c/IMG_1000.jpg"))
|
|
529
|
+
|
|
530
|
+
# change cwd to the parent of "a/" so that the relative path is valid
|
|
531
|
+
monkeypatch.chdir(temp_path(""))
|
|
532
|
+
|
|
533
|
+
results = fsutil.search_files("./a/", "**/c/IMG_*.png")
|
|
534
|
+
|
|
535
|
+
assert len(results) == 2
|
|
536
|
+
assert all(fsutil.is_file(result) for result in results)
|
|
537
|
+
|
|
538
|
+
|
|
521
539
|
def test_search_dirs(temp_path):
|
|
522
540
|
fsutil.create_file(temp_path("a/b/c/IMG_1000.jpg"))
|
|
523
541
|
fsutil.create_file(temp_path("x/y/z/c/IMG_1001.jpg"))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_fsutil-0.16.0 → python_fsutil-0.16.1}/src/python_fsutil.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|