file-roller delete file in certain circumstances

Bug #237543 reported by Miguel
6
Affects Status Importance Assigned to Milestone
File Roller
Fix Released
Medium
file-roller (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: zip

1) lsb_release -rd
Description: Ubuntu Vivid Vervet (development branch)
Release: 15.04

2) apt-cache policy file-roller
file-roller:
  Installed: 3.12.2-0ubuntu1
  Candidate: 3.12.2-0ubuntu1
  Version table:
 *** 3.12.2-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
        100 /var/lib/dpkg/status

3) What is expected to happen when one creates a an empty file on the Desktop:
test.txt

Highlight test.txt > secondary click > Compress... > Filename: example > in drop down choose .ZIP > Location: Desktop > Create > Close > highlight both test.txt and example.zip > secondary click > Compress... > Filename: example > in drop down choose .ZIP > Location: Desktop > Create > a window pops up noting:
Archive Manager
A file named "example.zip" already exists. Do you want to replace it?
The file already exists in "Desktop". Replacing it will overwrite its contents.

Click Replace and no files are deleted.

4) What happens instead is a dialog pops up noting:
Compress
An error occurred while adding files to the archive.
You can't add an archive to itself.

Click Close and one will notice example.zip has been permanently deleted.

Tags: hardy vivid
Changed in zip:
assignee: nobody → yves-debongnie
Revision history for this message
Yves Debongnie (yves-debongnie) wrote :

I have been able to reproduce the bug. Similarly to Miguel, I did the following :

1) I created a folder, in which I created a few text files. I named one of them example.zip.
2) I then selectionned the files I created, right-clicked on them
  and chosed "Créer une archive" ("Create an archive") in the drop-down menu
3) In the dialog popping up, I selected the .zip extension and filled in "example" as name
4) I then clicked on "Créer" ("Create").
5) A dialog popped up : "L'archive existe déjà. Voulez-vous l'écraser ?"
  ("The archive exists already. Do you want to overwrite it ?). I clicked on "Overwrite".
6) After the first dialog disappeared, another appeared :
    "Une erreur s'est produite durant l'ajout de fichiers à l'archive."
    "Vous ne pouvez pas ajouter une archive dans elle-même."
  Meaning :
    "An error occured during the addition of files to the archive"
    "You can not add an archive to itself"
  I then clicked on "Valider" ("Ok"), which was the only button available.
After this, the file example.zip that was previously in the folder had disappeared.

I added in French the messages I got when reproducing the bug in case my translation into
English is wrong.

Also, my version of Ubuntu is 8.04, and the zip package installed on my computer is 2.32-1.

I confirmed the bug.

Output of "uname -a" :
Linux Belzebuth 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686 GNU/Linux

Output of "apt-cache show zip" attached as "zip-version" file.

Revision history for this message
Yves Debongnie (yves-debongnie) wrote :

I have been able to reproduce the bug.

Changed in zip:
status: New → Confirmed
Changed in file-roller:
assignee: yves-debongnie → nobody
Revision history for this message
Yves Debongnie (yves-debongnie) wrote :

After a bit more looking around, it seems that it is the "file-roller" package which has the problem.

To determine this, I executed the following command in the console when reproducing the bug :
xprop | grep WM_CLASS

I then clicked on the dialogs, which gave me this output :
WM_CLASS(STRING) = "file-roller", "File-roller"

Also, I tried to reproduce the bug using the "zip" program in a console, and I could not reproduce
the bug. Here is what I tried to reproduce the bug at the command line :

------------------------------------------
yves@Belzebuth:~/Music$ ls -l
total 8
-rw-r--r-- 1 yves yves 18 2008-06-05 13:36 auie
-rw-r--r-- 1 yves yves 0 2008-06-05 13:36 auie~
-rw-r--r-- 1 yves yves 20 2008-06-05 13:36 eiau
-rw-r--r-- 1 yves yves 0 2008-06-05 13:36 eiau~
yves@Belzebuth:~/Music$ zip example.zip eiau auie
  adding: eiau (stored 0%)
  adding: auie (stored 0%)
yves@Belzebuth:~/Music$ zip example.zip eiau auie example.zip
updating: eiau (stored 0%)
updating: auie (stored 0%)
yves@Belzebuth:~/Music$ rm example.zip
yves@Belzebuth:~/Music$ touch example.zip
yves@Belzebuth:~/Music$ zip example.zip eiau auie example.zip
 zip warning: missing end signature--probably not a zip file (did you
 zip warning: remember to use binary mode when you transferred it?)

zip error: Zip file structure invalid (example.zip)
yves@Belzebuth:~/Music$
------------------------------------------

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for your report, may you tell us some steps in order to reproduce the bug with file-roller? thanks.

Changed in file-roller:
assignee: nobody → desktop-bugs
status: Confirmed → Incomplete
Revision history for this message
Yves Debongnie (yves-debongnie) wrote :

Um, I don't understand ... you have a full step-by-step explanation on how to reproduce the bug. Is there anything missing ? What other information do you need ?

Also, to clear up possible confusions, my last post was only explaining how I deduced that the bug is affecting file-roller instead of the zip package.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

the description was unclear, I've updated it to reflect the file-roller behavior.

description: updated
Revision history for this message
Pedro Villavicencio (pedro) wrote :
Changed in fileroller:
status: New → Unknown
Changed in file-roller:
importance: Undecided → Medium
status: Incomplete → Triaged
Changed in fileroller:
status: Unknown → New
Changed in file-roller:
importance: Unknown → Medium
penalvch (penalvch)
description: updated
tags: added: hardy vivid
Changed in file-roller (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
Changed in file-roller:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.