Question on %Z usage in buttonbar

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
grigsoft2
Junior Member
Junior Member
Posts: 4
Joined: 2006-02-03, 10:34 UTC
Contact:

Question on %Z usage in buttonbar

Post by *grigsoft2 »

I could not find this in description, so I will ask it here:
using %Z%P results in d:\path\archive.zip\sub\folder parameter. It's nice, but %P implies last slash, and %Z%P does not have last slash, which causes problems with my external tool.
Is this by design or it should be changed?
Thank you!
Last edited by grigsoft2 on 2009-08-04, 15:37 UTC, edited 1 time in total.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Agree, %Z shouldn't change path format. If P% has ending slash, %Z%P should have it too.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50841
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I agree, I will append a backslash if it's a folder within a zip, and none if it's a zip file.
Author of Total Commander
https://www.ghisler.com
grigsoft2
Junior Member
Junior Member
Posts: 4
Joined: 2006-02-03, 10:34 UTC
Contact:

Post by *grigsoft2 »

Thank you, Christian!
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

TC7.5rc1 added the feature.
And it works here.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50841
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for confirming it!
Author of Total Commander
https://www.ghisler.com
grigsoft2
Junior Member
Junior Member
Posts: 4
Joined: 2006-02-03, 10:34 UTC
Contact:

Post by *grigsoft2 »

RC1 does work as expected. Sorry to bother you again, but I have missed that from the beginning -
and none if it's a zip file
. Does somebody rely on this? I would need %Z%P to end with slash always, since even when archive root is passed, it's expected to be handled as folder, not as file.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Inside the zipfile, %Z%P returns,
I:\___NEW___2\xchm-1.13.zip
And if I enter a folder of the zipfile,
I:\___NEW___2\xchm-1.13.zip\New\
That is expected behaviour no?
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50841
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, this is done because I:\___NEW___2\xchm-1.13.zip is actually a file, not a directory.
Author of Total Commander
https://www.ghisler.com
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

I can understand grigsoft2. The zip-file should be handled as directory so I vote for appending the backslash.

But mainly I dont care. ;-)
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

What archiver expects a filename to end w/ slash? Wouldn't they choke on that?
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
Post Reply