Unpacker target directory

Discussion of bugs and problems found in Altap Salamander. In your reports, please be as descriptive as possible, and report one incident per report. Do not post crash reports here, send us the generated bug report by email instead, please.
User avatar
SvA
Posts: 484
Joined: 29 Mar 2006, 02:41
Location: DE

Unpacker target directory

Post by SvA »

I have got a simple unpacker which tackes the archive as its only parameter and unpacks to the current working directory. I added this to the 'Unpackers in Unpack Dialog Box' list. As the only parameter I added $(ArchiveDOSFullName). Support long names is acvtivated (though probably irrelevant, since the tool does not support extracting individual files in a manner that was supported be Servant Salamander).

I unpack to subdirectory named by archive.

Salamander creates the directory given in the unpack dialog, but extracts to the directory named by the archive's DOS Name minus extension. It does this even when the destination folder was changed in the dialog.

Let's take an Example. I have a folder and the Archive. Here is the partial
output of DIR /x

Code: Select all

16.06.2006  12:39            13.320 LONGNA~1.ARC Long Name.arc
16.06.2006  14:50    <DIR>          LONGNA~1     Long Names
As you can see, the DOS name of the directory is the the same as the DOS name of the archive without the extension.
Now I extract to the directory named by archive. I get:

Code: Select all

16.06.2006  14:57    <DIR>          LONGNA~2     Long Name
16.06.2006  12:39            13.320 LONGNA~1.ARC Long Name.arc
16.06.2006  14:57    <DIR>          LONGNA~1     Long Names
Files were extracted to LONGNA~1\, so they are now in "Long Names" instead of "Long Name" (possibly silently overwriting files which where there before).

Now I rename the archive to "Long Archive Name.arc", then extract it again, but change the destination folder to ARCHIVE:

Code: Select all

16.06.2006  15:02    <DIR>                       ARCHIVE
16.06.2006  12:39            13.320 LONGAR~1.ARC Long Archive Name.arc
16.06.2006  14:57    <DIR>          LONGNA~2     Long Name
16.06.2006  14:57    <DIR>          LONGNA~1     Long Names
16.06.2006  15:02    <DIR>                       LONGAR~1
Salamander created the destination folder ARCHIVE\, but extracted to LONGAR~1\.


Is there something wrong with my setup or the unarchiver tool I used, or is this a bug of Servant Salamander?
Petr Solin
ALTAP Staff
ALTAP Staff
Posts: 1112
Joined: 08 Dec 2005, 09:13
Location: Novy Bor, Czech Republic
Contact:

Post by Petr Solin »

It works this way: Salamander creates target path and starts unpacker process with current directory (working path) set to this target path. It's expected that unpacker unpacks files to current directory. Your unpacker seems to ignore current directory and unpacks all files to directory where archive is located. You can confirm this behaviour if you run your unpacker from command-line in target path.

If you can set target directory as parameter, set it to "." (current directory).
User avatar
SvA
Posts: 484
Joined: 29 Mar 2006, 02:41
Location: DE

Post by SvA »

Yes, you're right.

This tool indeed uses the complete path supplied to it, minus the extension, as it's target base directory (or, as you said, a subfolder named by the archives name, located in the archive's path).

I will have to create a script, since it does not support any other parameters.

Thank you for your help.
Post Reply