WCX interface: missing backslash for PackFilesW

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

WCX interface: missing backslash for PackFilesW

Post by *milo1012 »

This seems to happen when packing files from Branch View, when there is at least one file in a subdir.
Lets say I have c:\dir1 containing:

Code: Select all

fileX.txt
subdir/fileY.txt
When selecting both files in branch view and a custom pack extension,
and selecting Create separate archives, one per selected file/dir option
TC calls:

Code: Select all

SrcPath c:\dir1\subdir
AddList: fileY.txt
and
SrcPath c:\dir1\
AddList: fileX.txt
when the plugin exports PackFilesW.
So it suppresses the backslash for the file in the subdir!

When having ANSI PackFiles only,
TC correctly calls:

Code: Select all

SrcPath c:\dir1\subdir\
AddList: fileY.txt
...
Definitely related to branch view, but maybe some other situations I didn't test.
A search result fed to Listbox works correctly (SrcPath is empty, AddList contains full path).

Tested with TC 8.51a 32bit.
TC plugins: PCREsearch and RegXtract
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks, I will check it. But plugins should not rely on a specific form of the path field. It is valid with and without a backslash.
Author of Total Commander
https://www.ghisler.com
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

ghisler(Author) wrote:plugins should not rely on a specific form of the path field. It is valid with and without a backslash.
Sure, they "shouldn't", but the docs say:
SrcPath and AddList together specify files that are to be packed into PackedFile...

Some popular plugins will fail that way, e.g. the 7z-plugin will create an empty directory with the file's name in the archive for the subdir, instead of packing the file itself.
I also rely on simply joining the strings for RegXtract, that's where I observed it.
In any case, the behavior should be the same for PackFiles and PackFilesW.
TC plugins: PCREsearch and RegXtract
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

history852.txt wrote:18.08.15 Fixed: Branch view, pack files to plugin with option "Create separate archives" -> no backslash was appended to the path passed to the plugin (32/64)
Fix confirmed for PackFilesW (both 32/64).
TC plugins: PCREsearch and RegXtract
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!
Author of Total Commander
https://www.ghisler.com
Post Reply