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

List:       kfm-devel
Subject:    Re: Kioslave big patch (tar support in kfm)
From:       David Faure <David.Faure () insa-lyon ! fr>
Date:       1999-01-19 8:28:48
[Download RAW message or body]

On Tue, Jan 19, 1999 at 02:01:34AM +0100, David Faure wrote:
> Sven,
> 
> I'm digging out of your patch the part about tar.*
> 
> First question : why the following bit of code ?
> 
>     QString Command( "tar -%stvf -");
>     if (dirpath[0] != '\0')
>     {
>       Command += " \"";
>       Command += dirpath;
>       Command += "\"";
>     }
> 
> This creates a command such as "tar -tvzf - <dirpath>"
> If you give '-' as input file, what is dirpath good for ?
Oops, my brain was not working anymore yesterday !
Of course, this is in order to list only the contents of a dir.

> BTW, is testing [0]!='\0' equivalent to testing !isEmpty() ?
> (I think so...)
> 
> > 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; 
Then I don't understand the above anymore.
Why parse everything from the beginning ? Won't it take lots of memory (for 
a big tar.gz) for nothing ?

> also this would enable to get size of opened file.
What is it useful for ?
I saw the 0x7FFFFFFF returned, but where is it used ?

-- 
 ____________________________________________________________________
|                                                                    |
|  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