Files should copy using the cp -L logic to dereference

Bug #1267353 reported by Timo Reimerdes
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Files
Confirmed
Medium
Unassigned

Bug Description

Copying Files, i.e. to a usb drive makes all symlinks worthless.

As +Heath Paddock pointed out: it's not very elementary to have to worry about such a thing and is confusing from the abstract user perspective: clicking on a file that is really just a symlink opens it. Copying it to a drive however breaks it.

Suggestion:

make Files copy dereference symlinks as default.

Even if there are cases where you'd want to keep the symlinks intact when copying, it is more 'natural' to have a true COPY afterwards.

Revision history for this message
Cameron Norman (cameronnemo) wrote :

I have to mention that it is not as simple as just turning symlinks into copies. As an example, I recently copied my entire home folder onto an external drive. With the behaviour suggested in this bug, I would have had duplicate files. I think that if the symlink and the file it points to are beig copied, then it is fine to just replicate the link, but if only the link is copied, the link should be replaced with the file it links to.

Revision history for this message
Grzegorz G. (grzesiek1e5) wrote :

I think it's a good idea, but we should tell the user what's going on. Otherwise he might be confused. Maybe he expected symlinks to be copied, because of his logical thinking ("I know symlink to a file isn't a file itself. Why did file got copied, not symlink?"). Maybe someone told him that symlinks will be copied, not files. Maybe he thinks symlink is a fancy name for Windows' shortcut and expects them to behave the same.

I don't think beginner users will _have_ any symlinks, let alone copy them, so IMHO it's fine to show moderately technical explanation. ("This is a symbolic link. It is only an arrow that points to the file and it's useless without the file itself. (It remembers the location of a file.) Do you want to paste only a symbolic link or a file itself?")

---

When I think more about that idea: if I copy symlinks inside a filesystem, it makes sense to NOT dereference them. So it should only dereference them while:
- copying onto external media
- original file doesn't get copied on this media (If it does, we copy only the symlink and update it with new path.).

But then someone is used to one behavior (not dereferencing) and suddenly when he copies symlinks onto a pendrive, Files behaves differently (dereferences them)! Then he gets all confused, and this means our UX is bad. So it's best to either stick to one behavior or show info/warning when user initiates another behavior. (Or show window with some info and buttons and let them pick the behavior.)

Changed in pantheon-files:
status: New → Confirmed
importance: Undecided → Medium
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.