[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 1:01:34
[Download RAW message or body]

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 ?

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; also this would
> enable to get size of opened file.
Right. I'll see what I can do.

There is a problem when parent directories are not in the tar file (which
is very common).
They have to be emulated somehow, because otherwise the tar.gz contents
appear empty.

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