[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: Kioslave big patch
From:       Waldo Bastian <bastian () ens ! ascom ! ch>
Date:       1999-01-18 8:09:01
[Download RAW message or body]

Sven Radej wrote:
> 
> Hi,
> Sorry I'm late.
> 
> I want you to test it.
> 
> This patch enables kioslave to:
> 
> 1.) Copy recursive dirs from any protocol that supports reading. This includes
> tar too. If source enables deleting you can move rucursive as well.
> Will work on file proto too, but there are no fixes if source is socket
> or pipe or something like that.
> 
> 2.) Delete recursive dirs from any protocol that supports deleting. That
> includes file proto too.
> 
> 3.) Tar works as expected - except write&delete

That's nice.

> 
> Problems: Error reporting.
> The way it is now kioslave only reports error. For example if there is need
> to to ask to Overwrite, you get the rename dialog, but kfm doesn't repeat
> the operation with overwrite command. There are some situations where you
> get a bunch of error dialogs together (when you try to delete directory from
> RO ftp site or tar archive, or when you want to copy directory where that
> directory exists already) and when you start clicking Cancels on those
> dialogs kfm segfaults. I didn't touch kfm (yet) about that and I don't know
> if protocols handle properly overwrite flag.

I think we need to extend the communication protocol between
kioslave/kfm for this.

> There is something wrong with kfm: if you try to overwrite directory he warns
> you n times for files in that directory and not the directory itself. Imho,
> if there is ~/foo/  and you try to copy/move /usr/test/foo/ to your home it
> should only once ask to overwrite existing ~/foo/ (or rename your dest).
> 
> The way it currently works is to ask wether to overwrite files of ~/foo (or
> subdirs of foo. In other words, kfm in case of dir overwriting works like tar
> when extracting. This is bad; It is not expected to do so.
> This probably comes because kfm itself makes dest dir tree, and gives
> kioslave a list of files to copy. This is not how it is ment to be.
> Now kioslave can create dirs and subdirs; it can also recursive delete dirs.

This should be a simple fix in kfmman.cpp: Just remove the stuff which
does
the directory look ups.

> The only problem is asking use wether to overwrite.

Yes. We need to think of some smart solution here.

> Changes:
> Changed files main.cpp,h, tar.cpp,h
> main.cpp,h:
> I found Torben's experimental stuff, fixed it and added some missing functions
> and removed old copy. Then I fixed some other stuff like del.
> I didn't touch get, list and such stuff.

> There is a warning where symlinks, sockets and pipes shoul be checked for
> reading from.
> 
> tar.cpp;h
> I completely changed openDir, readDir and fiddled with open and read. OpenDir
> now reads all items from dir, and stores it into list; readDir gets things
> from the list (before readDir passed whole archive through tar to get next
> item). Wery important, OpenDir returns FAIL if url is file and not a dir.
> It is possible now to add write, mkdir and delete to tar proto.
> This is still not fantastc; this proto should read tar list on creation so
> that openDir doesn't require tarring archive every time; also this would
> enable to get size of opened file.
> 
> "The road ahead"?
> Although I touched only kioslave, it won't work without changing kfm;
> Kfm has no idea about restarting kislave in case of overwrite or rename.
> So we cannot use this changes without fixing kfm.

Let's change KFM then :)

> (Waldo I'm sending this to your .nl account too although weekend is over :-)

No prob, thanks!

Cheers,
Waldo
-- 
Linux, The Choice Of A GNU Generation.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic