Re: Copying behavior
- From: Alexander Larsson <alexl redhat com>
- To: Marcus Bjurman <marbj499 student liu se>
- Cc: gnome-vfs-list gnome org
- Subject: Re: Copying behavior
- Date: Wed, 5 Feb 2003 06:56:52 -0500 (EST)
On Tue, 4 Feb 2003, Marcus Bjurman wrote:
> Hi,
>
> I'm the developer of gnome-commander, a file manager that uses gnome-vfs
> for file handling. I'm sending this mail because I have found a problem
> in gnome-vfs that seems to confuse users of my app.
>
> The problem is that gnome-vfs acts strange when copying one directory
> over another. I belive many users expects that the target directory will
> be patched with the content of the new one. Here is an example:
>
> /tmp/foo contains foo1.txt
> /tmp/tmp/foo contains foo1.txt & foo2.txt
>
> When the user now copies /tmp/foo to /tmp/tmp/foo he expects foo1.txt to
> be replaced and foo2.txt should not be effected.
>
> I first thought that it was an easy to make it like that, if the program
> always returns 'skip' in the async_xfer_callback for all directories the
> uneffected files should be left untouched. This is not the case though
> since returning 'skip' for a directory automaticly skips all files in
> that directory too. So basicly nothing happens (foo1.txt is not
> updated). If I on the other hand return 'replace' in the
> async_xfer_callback foo2.txt is removed.
>
> The problem is the same in Nautilus. If you copy one directory over
> another you get a dialog asking if you want to replace the target
> directory or not. Select replace and all files in the target directory
> dissapears. Select skip and the whole operation is skipped.
>
> What's your comments on this, should gnome-vfs be able to handle this
> kind of 'patching' or is this something that my app has to solve by
> starting individual xfers for each file?
This is typical posix semantics that unix has used since it was created.
gnome-vfs is largely an extension of the unix filesystem and tries to
keep posix semantics as much as possible. Changing this would be a bad
thing, as it currently behaves the way programmers expect it to and
changing it would be a huge ABI change.
It might however be possible to add a new GnomeVFSXferOptions so that you
can get the behaviour you want from gnome_vfs_xfer.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a globe-trotting Jewish barbarian gone bad. She's a wealthy mutant
detective prone to fits of savage, blood-crazed rage. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]