Copying behavior



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?


/Marcus





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]