Feature Request : Respect symlinks and hardlinks and automatically save identical files as symlinks "ERROR: Dangerous link path was ignored"
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- cli, operating-systems
Direzione di ricerca
Start by reading the ZIP extraction handling for symbolic links and the code that reports “Dangerous link path was ignored”; the issue does not name files or tests. Reproduce with the supplied Windows archive and -snld command, then determine whether the relative link targets are incorrectly rejected. Done means safe links in the archive extract as expected, with tests covering the reported cases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi,
I have a situation where multiple subsequent version of a folder is being saved
Most of these files are identical
I tried transforming them into hardlinks and symlinks
For example consider this folder
I have created two copies of this folder
One where all identical files were replaced with hardlinks and another where they were replaced with symlinks using dupeguru
I then verified they were all identical to the original and they were
I compressed all of these files, and then decompressed again
The file were created this way
And here is the size of each of those zip files
Here is the size of each folders
So, it appears that even Explorer cannot really tell if that the hardlinked, deduplicated files do not really use the space up
But they really are hardlinks
Looking at the compression options, I can't see an option to respect either the softlinks nor hardlinks
And searching on google about this
It does appear that the -snl option should allow this
So I will try doing this using the command line instead
And that does work
And to make sure, I decompressed all 3 and then verified them against the originals again using winmerge
Unfortunately, that did not work as expected
And I don't know if this is because the path was too long, or because 7zip always refuses to decompress symlinks in files ?
I do know that, while users can create hardlinks, user cannot create symlinks for very silly reasons on windows. (microsoft incompetence)
But perhaps an elevated command line could decompress the file manually, at least to confirm the zip file itself was not malformed and verify if the problem is only related to the decompression.
First I tried a non-elevated command line.
It refuses to create symlinks, it should just create copies of the file at the very least if it cannot create a symlink !!
And I am getting lots of error
D:\dev\7ziptest\test>7z x Tab-Manager-Plus-Improvements-Project-0.2.100-to-0.2.113-symlinked.commandline.zip
7-Zip 25.01 (x64) : Copyright (c) 1999-2025 Igor Pavlov : 2025-08-03
Scanning the drive for archives:
1 file, 76008956 bytes (73 MiB)
Extracting archive: Tab-Manager-Plus-Improvements-Project-0.2.100-to-0.2.113-symlinked.commandline.zip
--
Path = Tab-Manager-Plus-Improvements-Project-0.2.100-to-0.2.113-symlinked.commandline.zip
Type = zip
Physical Size = 76008956
17% 4846 - Tab-Manager-Plus-Improvements-Project-0.2.100-to-0.2.113-symlinked\Tab-Manager-Plus-Improvements-Project-0.2.102-Refactor-Step3A\doc\v0276-reviewed-package-delta.json
...
ERROR: Dangerous link path was ignored : Tab-Manager-Plus-Improvements-Project-0.2.100-to-0.2.113-symlinked\Tab-Manager-Plus-Improvements-Project-0.2.110\patches\own-tab-reuse\doc\version-history.md : ..\..\..\..\Tab-Manager-Plus-Improvements-Project-0.2.106-R1-Portable-Node-Hotfix\patches\own-tab-reuse\doc\implementation.md
ERROR: Dangerous link path was ignored : Tab-Manager-Plus-Improvements-Project-0.2.100-to-0.2.113-symlinked\Tab-Manager-Plus-Improvements-Project-0.2.110\patches\own-tab-reuse\files\src\helpers\settings.ts : ..\..\..\..\..\..\Tab-Manager-Plus-Improvements-Project-0.2.105-Refactor-Step5\patches\own-tab-reuse\files\src\helpers\settings.ts
ERROR: Dangerous link path was ignored : Tab-Manager-Plus-Improvements-Project-0.2.100-to-0.2.113-symlinked\Tab-Manager-Plus-Improvements-Project-0.2.110\patches\own-tab-reuse\files\src\popup\settingsFile.ts : ..\..\..\..\..\..\Tab-Manager-Plus-Improvements-Project-0.2.109\patches\own-tab-reuse\files\src\popup\settingsFile.ts
...
Sub items Errors: 21455
Archives with Errors: 1
Sub items Errors: 21455
D:\dev\7ziptest\test>
And the winmerge check
Next I tried using using 7z on the command line inside an administrative console which should have the capability of creating a symlink
However the results were identical
Sub items Errors: 21455
Archives with Errors: 1
Sub items Errors: 21455
D:\dev\7ziptest\test>
At this point I asked the machine for advice
It suggested using -snld
Unfortunately, even in administrative console, -snld fails to create the symlink, incorrectly reporting the symlink as dangerous and ignoring it with no alternative
D:\dev\7ziptest\test>7z x -snld Tab-Manager-Plus-Improvements-Project-0.2.100-to-0.2.113-symlinked.commandline.zip
7-Zip 25.01 (x64) : Copyright (c) 1999-2025 Igor Pavlov : 2025-08-03
Scanning the drive for archives:
1 file, 76008956 bytes (73 MiB)
Extracting archive: Tab-Manager-Plus-Improvements-Project-0.2.100-to-0.2.113-symlinked.commandline.zip
--
Path = Tab-Manager-Plus-Improvements-Project-0.2.100-to-0.2.113-symlinked.commandline.zip
Type = zip
Physical Size = 76008956
ERROR: Dangerous link path was ignored : Tab-Manager-Plus-Improvements-Project-0.2.100-to-0.2.113-symlinked\Tab-Manager-Plus-Improvements-Project-0.2.100-Refactor-Step1\build-all.bat : ..\Tab-Manager-Plus-Improvements-Project-0.2.112\build-all.bat
ERROR: Dangerous link path was ignored : Tab-Manager-Plus-Improvements-Project-0.2.100-to-0.2.113-symlinked\Tab-Manager-Plus-Improvements-Project-0.2.100-Refactor-Step1\build.bat : ..\Tab-Manager-Plus-Improvements-Project-0.2.106-R1-Portable-Node-Hotfix\build.bat
ERROR: Dangerous link path was ignored : Tab-Manager-Plus-Improvements-Project-0.2.100-to-0.2.113-symlinked\Tab-Manager-Plus-Improvements-Project-0.2.100-Refactor-Step1\build.sh : ..\Tab-Manager-Plus-Improvements-Project-0.2.107\build.sh
- Lingua principale
- C++
- Stelle
- 4.6k
- Fork
- 519
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ip7z/7zip
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
area::installer documentation engine::sd enhancement wg::platform-core
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
lemonade-sdk/lemonade#4349 ·
I maintainer di solito rispondono entro 1 giorno
-
Python example: list a model's scenes and their camerasForse già presa @rudraparmar76 l’ha presa oggi. Apertadocumentation good first issue python
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
iamahsanmehmood/openskp#796 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
tenstorrent/tt-umd#4183 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
odelaneau/GLIMPSE#353 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni