Skip to content

Commit

Permalink
Merge pull request #51 from adamant-pwn/patch-2
Browse files Browse the repository at this point in the history
escape {} into '' for non-standard filenames
  • Loading branch information
akahles authored Nov 19, 2024
2 parents 52d9ebe + 3617fec commit 0f1ecfd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion archiver/checks/default_preparation_checks.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions tests/features/test_preparation_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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)
assert not check.run(tmpdir)

0 comments on commit 0f1ecfd

Please sign in to comment.