Skip to content

Commit d5e5f93

Browse files
committed
Call paths.safe_path using preserve_spaces argument
* Update expected test results Signed-off-by: Jono Yang <jyang@nexb.com>
1 parent 632f6a8 commit d5e5f93

10 files changed

+638
-634
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Changelog
44
v (next)
55
--------
66

7+
- Spaces in filenames are no longer replaced by underscores when files are
8+
extracted from archives.
79

810
v21.6.2
911
-------

src/extractcode/libarchive2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def extract(location, target_dir, skip_symlinks=True):
203203
if TRACE:
204204
logger.debug(' writing.....')
205205

206-
_target_path = entry.write(abs_target_dir, transform_path=paths.safe_path)
206+
_target_path = entry.write(abs_target_dir, transform_path=partial(paths.safe_path, preserve_spaces=True))
207207

208208
return warnings
209209

0 commit comments

Comments
 (0)