diff --git a/archiver/checks/default_preparation_checks.ini b/archiver/checks/default_preparation_checks.ini index 546aceb..084e96b 100644 --- a/archiver/checks/default_preparation_checks.ini +++ b/archiver/checks/default_preparation_checks.ini @@ -26,7 +26,7 @@ precondition=find --version | grep 'GNU findutils' precondition_failure_msg=Requires GNU find. On mac, you can install it using 'brew install findutils' # for every link, resolve path relative to archive dir, if not within archive dir, print absolute # note, that the second -exec will only be executed if the previous exec was successful -check_cmd=find . -type l ! -xtype l -exec sh -c "realpath --relative-base . {} | grep --quiet '^/' " \; -exec echo {} \; +check_cmd=find . -type l ! -xtype l -exec sh -c "realpath --relative-base . '{}' | grep --quiet '^/' " \; -exec echo '{}' \; success_conditions=EMPTY_OUTPUT check_failure_msg=Found symlinks pointing outside the directory tree of {WDIR}. Archives may not be complete. diff --git a/tests/features/test_preparation_checks.py b/tests/features/test_preparation_checks.py index 2c75ffc..4f844d7 100644 --- a/tests/features/test_preparation_checks.py +++ b/tests/features/test_preparation_checks.py @@ -52,7 +52,7 @@ def test_symlinks_within_dir_only(default_checks: Dict[str, CmdBasedCheck], tmpd myfile = Path(tmpdir, 'myfile') myfile.touch() - mylink = Path(tmpdir, 'mylink') + mylink = Path(tmpdir, 'mylink (1)') mylink.symlink_to(myfile.relative_to(mylink.parent)) mylink2 = Path(tmpdir, 'mylink2') @@ -98,4 +98,4 @@ def test_no_duplicates(default_checks: Dict[str, CmdBasedCheck], tmpdir): myfile_link = Path(tmpdir, 'myfile_link') os.link(myfile, myfile_link) - assert not check.run(tmpdir) \ No newline at end of file + assert not check.run(tmpdir)