[Bug?] Default archive name when packing

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Flint
Power Member
Power Member
Posts: 3511
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

[Bug?] Default archive name when packing

Post by *Flint »

There is a question about TC's behaviour in suggesting default archive name. Consider 3 situations:
1. Pack a single file, e.g. asd.txt – the suggested name is: asd.zip.
2. Pack two or more files from some folder – the suggested name will be folder.zip ("folder" being the name of the folder where these files are located).
3. Pack again one single archive into a new archive (say, asd.rar) – the suggested name is again folder.zip! Why? It's much more convenient if its new name were asd.zip by default.

PS: In the 3rd case I mean not repacking the contents of the RAR archive into ZIP, I mean packing the RAR archive itself into a ZIP. This may be useful sometimes.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Why? It's much more convenient if its new name were asd.zip by default.
Maybe, but what happens when user switches to RAR again? This would lead to a name collision. I think this is why default name when packing an archive is set to the parent directory name.

Icfu
This account is for sale
User avatar
Flint
Power Member
Power Member
Posts: 3511
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

But with e.g. TAR there is no such substitution of names! What if the user will pack TAR into TAR? Sky does not fall down, just the TAR archive will contain two files: original and packed. So, why not doing the same with other archives?
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

So, why not doing the same with other archives?
Indeed, this is one of those feature that are not implemented consistently. GZ and TAR use archive name, all plugins do as well.

All I can say is that RAR will give an error message when you try to double pack with the same name, ZIP and TAR won't. I don't know what's best here, maybe do an INI setting or whatever. It doesn't matter what I propose anyway, let ghisler roll the dice.

Icfu
This account is for sale
User avatar
Flint
Power Member
Power Member
Posts: 3511
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

The best behaviour in this case, I suppose, is to left the archive name to the original name of the file only if the packer selected is not the same. Example:
I'm trying to pack asd.zip and call the Pack Files dialog with default RAR selected - TC suggests asd.rar. I switch the packer to ZIP - the suggested name becomes folder.zip. I switch back to RAR - it is restored to asd.rar.
(ZIP and TAR may be excluded from this behaviour - as they allow to add an archive into itself.)

I think, this would be the most convenient behaviour, because people pack double-archives with the same packer extremely rare.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

I think, this would be the most convenient behaviour, because people pack double-archives with the same packer extremely rare.
Actually I have never packed an archive with different packers. I am using double-packed archives only when I want to hide the filenames when encryption is used and in this case I always use the same packer.

So, I would prefer to have the archive name proposed for all packers which support that, indepent of whether different packers are used.
Of course, enabling it only for those cases when different packers are chosen, is more easy. So, whatever fits for you. ;)

Icfu
This account is for sale
Post Reply