Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 785583 - app-arch/file-roller-3.38.1: Opening files with .. in name inside .zip results in leaving the temporary dir (~/.cache/.fr-xxxxxx)
Summary: app-arch/file-roller-3.38.1: Opening files with .. in name inside .zip result...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-25 10:31 UTC by Frederik Pfautsch
Modified: 2023-12-18 09:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge_info.txt,20.60 KB, text/plain)
2021-04-25 10:32 UTC, Frederik Pfautsch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frederik Pfautsch 2021-04-25 10:31:06 UTC
When I create a .zip-file using `zip test.zip -r ../../test`, copy test.zip into the parent directory and open it in file-roller to view a text file in the test directory, the actual file is opened, not the just temporarily extracted one.

Reproducible: Always

Steps to Reproduce:
1. Create dir ~/test with one text file in with random content (~/test/random.txt)
2. Create dirs ~/1/2 and cd into 2
3. `zip test.zip -r ../../test`, zip created test folder
4. Move test.zip into dir 1
5. Change content of ~/test/random to something else
6. Open test.zip in fileroller and open file random (in file-roller)
Actual Results:  
- The viewed file (with e.g. gedit) is not the zipped file, it is the actual, original file
- If the name of ~/test/random is changed, the file can't be opened in file-roller, because it doesn't exist (can't be found)
- If test.zip is extracted, either using unzip or nautilus context menu, random will be created in the root-folder of the archive "test", instead of in the subfolder

Expected Results:  
- The opened file is exactly the file zipped, file-roller / gedit do not break out of .cache/.fr-xxxxxx
- During extraction the folder structure is kept, minus the ..-references. All files are extracted into their corresponding folders, not into the root-folder of the zip-file
Comment 1 Frederik Pfautsch 2021-04-25 10:32:17 UTC
Created attachment 702399 [details]
emerge --info
Comment 2 Frederik Pfautsch 2021-04-25 10:46:34 UTC
I couldn't upload a little example with .gitconfig as attachment (error 500) so I put it into a gitlab: https://gitlab.com/f14h/zip-extract-gentoo

Just copy that .zip into ~/Downloads or somewhere else and open it with file-roller and the contained .gitconfig with e.g. gedit. If ~/.gitconfig exists, this file with be shown instead.
Comment 3 Frederik Pfautsch 2021-04-25 10:54:03 UTC
Another interesting side-effect: When the archive is opened and you change the *original* file, file-roller asks you if you want to update the archive.
Comment 4 Pacho Ramos gentoo-dev 2023-12-18 09:52:10 UTC
Are you still hitting this with the latest unzip version? It seems like an unzip bug to me (file-roller uses unzip at the end)