Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#86 Full path stored in archive

open-remind
nobody
None
5
2009-03-14
2009-03-09
ami_stuff
No

Hi,

Why 7za archives drive name when I use it on Windows, not only dir structure with files?

When I use it like this:

"7za a test.7z c:test"

it will store full path in the archive -> "c:test/*".

The question is why? Wouldn't it better to store olny dir structure without drive name (letter)?

Regards

Discussion

  • my space
    my space
    2009-03-11

    I don't understand.

    p7zip runs on Unix (Linux), MacOSX, BeOS, ...
    but not on Windows ...

    For Windows go to www.7-zip.org.

    Only Windows use ":" as a special character or a "drive name".

    On other systems, ":" is a mere character like "_".
    So "c:test" is processed like "c_test" or "foobar" !

    ex :
    "7za a test.7z c:test"
    stores the file "c:test" in the archive test.7z (if "c:test" is a file)
    or
    stores the directory "c:test" (and all its files/directories children) in the archive test.7z (if "c:test" is a directory)

    Remark : "c:test" is not a full path for any system.

    On Unix, a full path begins with "/" (ex : /home/account)
    On Windows , a full path begins with a letter, then a ":", then a "\" (ex : d:\home\account)
    (on Windows, there are also paths that begins with \\server\ or other weird things ...)

     
  • my space
    my space
    2009-03-11

    • status: open --> closed-invalid
     
  • ami_stuff
    ami_stuff
    2009-03-11

    >p7zip runs on Unix (Linux), MacOSX, BeOS, ...
    > but not on Windows ...

    I did use cygwin version for test:

    http://ftp.uni-kl.de/pub/windows/cygwin/release/p7zip/

    > On other systems, ":" is a mere character like "_".
    > So "c:test" is processed like "c_test" or "foobar" !

    I compiled 7za for Amiga and ":" is always at the end of drive name just like it is at the end of drive letter on DOS/Windows.

    When you use unmodified 7za on Amiga like this:

    "7za a test.7z dh0:test" -> "test" is a dir with files.

    It will create in archive "dh0:test" directory and files inside it.

    As a result when you will want to extract archive:

    "7za x test.7z" it will always overwrite dh1:test/* files no metter in which directory you will be actually.

    Also, on Amiga "c:" drive is an assign to "sys:c" directory where you can find all system commands - something like "/bin" drive on the Linux.

    "assign c: sys:c"

    > Remark : "c:test" is not a full path for any system.

    Yes it is... for Amiga :)

    Amiga paths can be like this:

    drive_name:directory/dirextory2/directoryn/file1

    Drive names can have max. 30 chars if I remember correctly and there is always ":" at the end, so the easiest way to make 7za Amiga compatible would be filter drive name from the path and store only directory structure with files in the archive.

     
  • my space
    my space
    2009-03-14

    > I did use cygwin version for test:
    > http://ftp.uni-kl.de/pub/windows/cygwin/release/p7zip/

    On Windows, the only official version is from www.7-zip.org ;)

    p7zip can be built in the cygwin environment because this environment behaves like an Linux.

    In the early stage of p7zip, the cygwin target was to allow Igor Pavlov (creator of 7-zip)
    to support itself my port of 7-zip on Unix (built with gcc/g++ and pthreads).
    But he never wanted to support himself other target but Windows ...

    the cygwin environment behaves like the Linux environment so
    "7za a test.7z c:test" stores a filename "c:test".

    If you don't want this behaviour, use 7z/7za provided by Igor Pavlov.
    "7za a test.7z c:test" stores a filename "test".

    Or
    cd c:
    7za test.7z test

    >> On other systems, ":" is a mere character like "_".
    >> So "c:test" is processed like "c_test" or "foobar" !

    > I compiled 7za for Amiga and ":" is always at the end of drive name just
    > like it is at the end of drive letter on DOS/Windows.

    I didn't remember that.
    a long time ago, I played with an amiga (insert a floppy, switch on and don't forget to plug the joystick ;)

    I don't plan to support myself the amiga environment.
    I don't have enough spare time to support all the environments :(

    But I can help an amiga developper.

    I think that the developper should look at the function :
    nameWindowToUnix (CPP\myWindows\myPrivate.h)

    Remark : Igor Pavlov don't want to support the storing of absolute path
    (on Windows, the drive name is not stored in the archive)

    > When you use unmodified 7za on Amiga like this:
    > "7za a test.7z dh0:test" -> "test" is a dir with files.

    you should not use absolute path for the files you want to put in the archive
    (this advice is also for Windows or Unix ...)

    cd dh0:
    7za a dh1:test.7z test

    Remark :
    I just launched "amiga inside" and choose "amiga 4000 with workbench 3.1"
    There are only (by default) 2 Mb chip RAM and 8 Mb other RAM !?

    With which kind of amiga do you want to use p7zip ?
    Do you use workbench 4.x for PC or powerpc ?

    I also tried "cc" and "gcc" in the AmigaShell but I got only "Command Error" ...
    I don't know where to find gcc/g++ and the "unix" library for "amiga 4000 with workbench 3.1"...

     
  • my space
    my space
    2009-03-14

    • status: closed-invalid --> open-remind
     
  • ami_stuff
    ami_stuff
    2009-03-14

    > On Windows, the only official version is from www.7-zip.org ;)

    Ok.

    >> I compiled 7za for Amiga and ":" is always at the end of drive name
    just
    >> like it is at the end of drive letter on DOS/Windows.

    >I didn't remember that.
    >a long time ago, I played with an amiga (insert a floppy, switch on and
    >don't forget to plug the joystick ;)

    So that was a really un-expanded Amiga I guess ;)

    > I don't plan to support myself the amiga environment.
    > I don't have enough spare time to support all the environments :(

    > But I can help an amiga developper.

    >I think that the developper should look at the function :
    > nameWindowToUnix (CPP\myWindows\myPrivate.h)

    Thanks. I already modified p7zip to archive only dirs/files and not store drive names in archive, but it's a really hacky code. Only thing which don't want correctly is archiving whole drives like this:

    "7za a test.7z dh0:"

    but I think it's not a big problem - with 256MB free mem (max. mem on m68k CPU) I got "out of memory" error message.

    >Remark :
    >I just launched "amiga inside" and choose "amiga 4000 with workbench 3.1"
    >There are only (by default) 2 Mb chip RAM and 8 Mb other RAM !?

    Which year it was? Come on man! 1992! ;)

    >With which kind of amiga do you want to use p7zip ?
    >Do you use workbench 4.x for PC or powerpc ?

    I had 68060/75MHz + 128MB RAM + Voodoo 3 PCI + SB 128 + HDD 10GB SCSI + CDRW 4x/2x/2x SCSI and some more stuff in 2001 year. Right now I use only WinUAE on PC.

    WB 4.0 is PowerPC only:

    http://en.wikipedia.org/wiki/AmigaOne

    >I also tried "cc" and "gcc" in the AmigaShell but I got only "Command
    >Error" ...

    Are you sure GCC was installed on this Amiga? ;)

    >I don't know where to find gcc/g++ and the "unix" library for "amiga 4000
    >with workbench 3.1"...

    http://ftp.back2roots.org/geekgadgets/amiga/m68k/alpha/gcc/

    I guess "unix" library is ixemul.lib - it emulates unix stuff on Amiga,
    so you can port most of the unix software without modifications:

    http://ftp.back2roots.org/geekgadgets/amiga/m68k/alpha/ixemul/native/

    and here is Amiga cross-compiler -> Windows based:

    http://amidevcpp.amiga-world.de/index.php?HR_LANG=english (GCC 3.4)

    I have also m68k-amigaos-gcc/g++ 4.4 alpha on my HDD.

     
  • my space
    my space
    2009-03-14

    > So that was a really un-expanded Amiga I guess ;)

    Amiga 500 with a 1.2 (1.3 ?) workbench and (1Mb RAM ?) ...

    > WB 4.0 is PowerPC only: http://en.wikipedia.org/wiki/AmigaOne

    Ok,
    but I remembered an AmigaOS for PC, look at this article : http://www.osnews.com/story/604

    As wikipedia didn't talk about Amiga OS XL, I think that this OS is dead ?

    "Amiga Inside" is a package that provides a ready to use amiga emulator :
    winuae, configuration files, ROM, floppies, hard drives, ...

    > Are you sure GCC was installed on this Amiga? ;)

    I think that the guy who did "amiga inside" didn't install GCC ;)
    This package is mainly to be able to run amiga games :)

    Thank you for all of your URL for gcc / cross-gcc.

    But now, what do you want me to do (to better support AmigaOS) ?

    Your initial request was :
    "
    7za a test.7z c:test"

    it will store full path in the archive -> "c:test/*".

    The question is why? Wouldn't it better to store olny dir structure without
    drive name (letter)?
    "

    I finally answered you : use 7za/7z for Windows and not p7zip for Windows ;)

     
  • ami_stuff
    ami_stuff
    2009-03-14

    > but I remembered an AmigaOS for PC, look at this article :
    > http://www.osnews.com/story/604

    Yes there was something like this, but it was only an emulation, not native x86 system.

    > I finally answered you : use 7za/7z for Windows and not p7zip for Windows
    > ;)

    At the beginning I thought that 7za supports DOS paths, but I was wrong and I didn't know that ":" is not an illegal character on the unix.

    Have a nice day!