Re: [PATCH] 312707: moving a file or folder onto itself destroys it
- From: Alexander Larsson <alexl redhat com>
- To: Tuukka Tolvanen <tuukka tolvanen gmail com>
- Cc: gnome-vfs-list gnome org
- Subject: Re: [PATCH] 312707: moving a file or folder onto itself destroys it
- Date: Thu, 25 Aug 2005 12:38:19 +0200
On Sat, 2005-08-06 at 21:51 +0300, Tuukka Tolvanen wrote:
> Tuukka Tolvanen wrote:
>
> > The attached patch is not quite a correct fix -- when move+replacing
> > identical but separate hardlinks it fails to remove the source.
>
> bah. I threw another candidate on bugzilla that fixes /that/ issue:
> - check for directory entry name match, then
> - check for directory entry namespace match (same parent fileinfo)
>
> http://bugzilla.gnome.org/show_bug.cgi?id=312707#c3
Hmmm. bugzilla down atm...
> ...but then realized it's not the right solution either -- on e.g. ftp,
> we don't get any decent identifying information in file_info so the
> same-parent-folder test would be susceptible to false positives.
>
> Besides, the same filesystem could be reachable via multiple methods at
> the same time anyhow, which renders fs entry identity comparisons pretty
> academic. Temp-renaming targets that are in the way, instead of
> deleting, seems to be the only way to really cover all the cases, that I
> can think of. Does that sound right?
I dislike both the initial fix and doing temp renaming. They introduce
even more stats and other i/o into an already slow gnome_vfs_xfer. Also,
such solutions sounds inherently racy.
The kernel allows a move (rename) from parent2/folder to parent1/folder.
It just returns success and does nothing. I wonder why a gnome-vfs-xfer
removes the file. Shouldn't it just end up being a gnome_vfs_move (since
the files are on the same filesystem), which shouldn't remove the file?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a Nobel prize-winning albino assassin from the Mississippi delta. She's a
manipulative psychic pearl diver with only herself to blame. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]