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

List:       kfm-devel
Subject:    Re: Kioslave big patch
From:       David Faure <David.Faure () insa-lyon ! fr>
Date:       1999-01-19 10:23:45
[Download RAW message or body]

Things are getting complicated.

How can one add a directory, a file, ... to an archive ?

1) If the archive is compressed (.tar.gz), tar says
"Cannot update compressed archives".
Ok, I return KIO_ERROR_NotPossible.

2) For a normal tar archive (which is less useful than tar.gz, I want you
to note), adding something needs a temporary directory hierarchy in order
to create the files :
Try it on command line, it's really hard ;


-zsh- dfaure 11:17 /tmp>mkdir parent
-zsh- dfaure 11:20 /tmp>touch parent/afile.txt
-zsh- dfaure 11:20 /tmp>tar cvf myarchive.tar parent/
parent/
parent/afile.txt
-zsh- dfaure 11:20 /tmp>rm -rf parent

ok, I have a tar archive.

-zsh- dfaure 11:20 /tmp>tar rvf myarchive.tar parent/child/
tar: Cannot add file parent/child: No such file or directory
tar: Error exit delayed from previous errors

I can't add something to it if it doesn't exist in a local subdir first.

-zsh- dfaure 11:21 /tmp>mkdir parent/child/
mkdir: cannot make directory `parent/child/': No such file or directory

I can't create it easily. The whole hierarchy is needed.

-zsh- dfaure 11:21 /tmp>mkdir parent ; mkdir parent/child/
-zsh- dfaure 11:21 /tmp>tar rvf myarchive.tar parent/child/
parent/child/

That's it, it worked.

Now, is kfm supposed to do all this ???

I think I'll let Mkdir return 'not implemented' as it already did !
Grrrr, lost 2 hours for nothing.

-- 
 ____________________________________________________________________
|                                                                    |
|  David FAURE                                                       |
|  E-mail : David.Faure@insa-lyon.fr, faure@kde.org                  |
|  http://www.insa-lyon.fr/People/AEDI/dfaure/index.html             |
|____________________________________________________________________|

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

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