Skip to content
Commit 222bb41f authored by Sergio Costas's avatar Sergio Costas Committed by António Fernandes
Browse files

Fix move operation in treeview DnD

When doing a DnD operation from outside Nautilus into one of
its windows, if the window is in "iconview mode", Nautilus
is able to detect when the origin and the destination folders
are in the same disk volume and do a move in that case, or
do a copy when they are in different volumes.

Unfortunately, when the window is in "treeview mode", this
operation doesn't work as expected, and always copy the file(s),
no matter if the origin and destination folders are or not in
the same volume.

After tracking the bug, I found that, in "treeview mode", the
NautilusFile object with the destination folder doesn't have
defined the filesystem_id property. This makes fail the
check_same_fs() function, which always returns FALSE. In
"iconview mode", instead, the object does have that property
defined, and that's why there it works.

I did a fix proposal, and although it was a safe workaround,
António Fernandes found a better way to fix it, which is
this patch.

Fix https://gitlab.gnome.org/GNOME/nautilus/-/issues/2170
parent c37dc7cf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment