merging symbolic link with target folder of same name destroys folder

Bug #1656370 reported by Michael Black
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Nautilus
Fix Released
Critical
nautilus (Ubuntu)
Fix Released
High
FanJun Kong - ( BH1SCW )

Bug Description

I recently lost a directory full of valuable files. I'm running ubuntu 16.04 and using nautilus 3.14.3

Here's how to replicate this bug. From a terminal window starting in my home directory:

mkdir useful
cd useful
touch stuff1.txt
touch stuff2.txt

cd ../Desktop
ln -s ../useful/ useful

Now I have a symbolic link on my desktop "useful" that links to directory "useful" containing two files.

From nautilus:

- Go to Desktop, select the link useful
- press Ctrl-X to copy
- Go to Home
- press Ctrl-V to paste
- dialog box appears: Merge folder "useful"
- press Merge button (the default)

directory useful has now been replaced with a symbolic link pointing to itself, and all its contents are gone.

Now in nautilus I press Ctrl-Z to undo. Symbolic link "useful" reappears on the Desktop, but the target folder is not reconstructed.

Why is this a important bug:

1. Merge dialog gives no indication that the source is a symbolic link. Instead it asks the user if wants to merge the files in two folders.

2. Continuing with the merge is the default option.

3. After the merge the symbolic link survives and the folder and its contents are utterly gone. They cannot be found in the trash.

4. Undo does not restore the folder or its files, just relocates the symbolic link.

Tags: xenial
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software by following the instructions at https://wiki.ubuntu.com/Bugs/Upstream/GNOME. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

Changed in nautilus (Ubuntu):
importance: Undecided → High
Revision history for this message
Michael Black (tethys12) wrote :

I reposted this as a comment for Gnome Bugzilla bug #632323, which was opened in 10/2010 and appears to describe an identical problem. Six years in it doesn't seem to have been addressed. Thanks!

Revision history for this message
FanJun Kong - ( BH1SCW ) (fjkong) wrote :

I can reproduce this bug on 16.10 Nautilus version is 3.20.3 following Michael Black's steps, but there is small mistake:
it should be :
cd Desktop instead of "cd ../Desktop"

Revision history for this message
FanJun Kong - ( BH1SCW ) (fjkong) wrote :

the quick fix seems neat and good by the way.

Changed in nautilus (Ubuntu):
status: New → Triaged
Changed in nautilus:
importance: Unknown → Critical
status: Unknown → Confirmed
Changed in nautilus:
status: Confirmed → Fix Released
Revision history for this message
Amr Ibrahim (amribrahim1987) wrote :

The bug is fixed upstream. Please consider backporting to Xenial.

tags: added: xenial
Changed in nautilus (Ubuntu):
assignee: nobody → FanJun Kong - ( BH1SCW ) (fjkong)
Revision history for this message
Amr Ibrahim (amribrahim1987) wrote :

Fixed in Artful.

Changed in nautilus (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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