Open Ashbd9 opened 2 months ago
It's feature.
7-zip removes path prefixes for absolute paths and for paths starting from ./
.
7-zip doesn't remove path prefixes for relative paths without ./
prefix.
So if you want path prefixes in archive, do not use ./
.
If you don't want path prefixes in archive, use ./
or absolute paths.
I have been reading the documentation and found that I can use the -spf
flag to make it work in my case.
Thank you!
System: Linux 7z version: 24.08
How to reproduce:
touch file
mkdir subdir
touch subdir/file
7zz a .7z ./file ./subdir/file
Current Behaviour: ERROR: Duplicate filename on disk: file file
Expected Behaviour: The archive .7z is created and contains file subdir/file. By the way, it works if the filename arguments are passed without the starting "./" i.e. as
7zz a .7z file subdir/file
It does not work when it is7zz a .7z ./file ./subdir/file
Also does not work is7zz a .7z /tmp/file /tmp/subdir/file