-
Notifications
You must be signed in to change notification settings - Fork 224
Open
Description
Minimal Working Example (Linux):
touch test.txt
7z a test.tar test.txt
mkdir foo
mkdir bar
ln -s ../bar foo/bar-slDirectory structure:
.
├── test.txt
├── test.tar
├── foo
│ └── bar-sl -> ../bar
└── bar
Path resolution check (works correctly)
On Unix, foo/bar-sl/../test.tar resolves to ./test.tar because of quirk in the Unix path design.
The file command correctly handles this:
$ file foo/bar-sl/../test.tar
foo/bar-sl/../test.tar: POSIX tar archive (GNU)7zip behavior (incorrect)
$ 7z t foo/bar-sl/../test.tar
7-Zip (z) 25.01 (x64) : Copyright (c) 1999-2025 Igor Pavlov : 2025-08-03
64-bit locale=en_US.UTF-8 Threads:16 OPEN_MAX:1024, ASM
Scanning the drive for archives:
1 file, 1536 bytes (2 KiB)
Testing archive: foo/bar-sl/../test.tar
ERROR: foo/bar-sl/../test.tar
Cannot open the file as archive
errno=2 : No such file or directory
Can't open as archive: 1
Files: 0
Size: 0
Compressed: 0It appears that 7zip is normalizing foo/bar-sl/../test.tar as foo/test.tar.
XRef: JuliaLang/julia#60251
As a workaround in JuliaLang/Pkg.jl#4538, realpath is used before passing the path to 7zip.
Metadata
Metadata
Assignees
Labels
No labels