Here are some tests of 7-Zip 15.14 (released in 2015-12-31) showing how it deals with relatives and absolutes paths in list files.
+=====================+=====================+==========================+===========================+
| content of list.txt | 7z a p.7z @list.txt | 7z a p.7z -spf @list.txt | 7z a p.7z -spf2 @list.txt |
+=====================+=====================+==========================+===========================+
| /tmp/dir1/file.txt | file.txt | /tmp/dir1/file.txt | tmp/dir1/file.txt |
+---------------------+---------------------+--------------------------+---------------------------+
| dir1/file.txt | dir1/file.txt | dir1/file.txt | dir1/file.txt |
+---------------------+---------------------+--------------------------+---------------------------+
| ./dir1/file.txt | file.txt | ./dir1/file.txt | file.txt |
+---------------------+---------------------+--------------------------+---------------------------+
| /tmp/dir1/file.txt | error | /tmp/dir1/file.txt | tmp/dir1/file.txt |
| /tmp/dir2/file.txt | | /tmp/dir2/file.txt | tmp/dir2/file.txt |
+---------------------+---------------------+--------------------------+---------------------------+
| dir1/file.txt | dir1/file.txt | dir1/file.txt | dir1/file.txt |
| dir2/file.txt | dir2/file.txt | dir2/file.txt | dir2/file.txt |
+---------------------+---------------------+--------------------------+---------------------------+
| ./dir1/file.txt | error | ./dir1/file.txt | error |
| ./dir2/file.txt | | ./dir2/file.txt | |
+---------------------+---------------------+--------------------------+---------------------------+
Here are the outputs of some tests. The switch -bb
makes 7-Zip to show the processed files and paths.
$ cat list.txt
/tmp/dir1/file.txt
$ 7z a p.7z -bb @list.txt
7-Zip (a) [64] 15.14 : Copyright (c) 1999-2015 Igor Pavlov : 2015-12-31
p7zip Version 15.14.1 (locale=pt_BR.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs x64)
Scanning the drive:
1 file, 4 bytes (1 KiB)
Creating archive: p.7z
Items to compress: 1
+ file.txt
Files read from disk: 1
Archive size: 130 bytes (1 KiB)
Everything is Ok
$ cat list.txt
/tmp/dir1/file.txt
/tmp/dir2/file.txt
$ 7z a p.7z -spf -bb @list.txt
7-Zip (a) [64] 15.14 : Copyright (c) 1999-2015 Igor Pavlov : 2015-12-31
p7zip Version 15.14.1 (locale=pt_BR.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs x64)
Scanning the drive:
2 files, 9 bytes (1 KiB)
Creating archive: p.7z
Items to compress: 2
+ /tmp/dir1/file.txt
+ /tmp/dir2/file.txt
Files read from disk: 2
Archive size: 190 bytes (1 KiB)
Everything is Ok