[TC 11.55rc1] Copy with filter "somedir1\**\" copies whole folder structure

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

Moderators: Hacker, petermad, Stefan2, white

User avatar
white
Power Member
Power Member
Posts: 5895
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.55rc1] Copy with filter "somedir1\**\" copies whole folder structure

Post by *white »

ghisler(Author) wrote: 2025-05-20, 10:29 UTC I just need to set the flag to not copy folders without content when there is any subfolder in the filter. Then when entering such a folder, I need to clear that flag.
Obviously.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50703
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.55rc1] Copy with filter "somedir1\**\" copies whole folder structure

Post by *ghisler(Author) »

This should be fixed in Total Commander 11.55 RC3, please test it!
20.05.25 Fixed: When using a copy filter with included directories (like *.pdf somedir\ ), do not copy directories outside of the provided directories (32/64)
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5895
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.55rc1] Copy with filter "somedir1\**\" copies whole folder structure

Post by *white »

Tested OK. But found another bug where you need a similar solution. The issue occurs when the specified folder to include starts with a backslash.
  • Suppose in folder c:\test, you have some folders and also this folder structure: sub1\sub2\sub3
  • Go to c:\test
  • Select all folders
  • Press F5 to copy
  • Use copy filter: sub1\sub2\sub3\sub4\sub5\
    In release candidate 3, this now correctly copies nothing.
  • Now do the same, but add a leading backslash to the filter: \sub1\sub2\sub3\sub4\sub5\
    This copies the folder structure (not the contents) sub1\sub2\sub3 to the destination.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50703
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.55rc1] Copy with filter "somedir1\**\" copies whole folder structure

Post by *ghisler(Author) »

Hmm, I'm not so sure about that, there is a clear difference between the two:
Filter sub1\sub2\sub3\sub4\sub5\ means anywhere in the path, so we need an exact match of all subdirs.
Filter \sub1\sub2\sub3\sub4\sub5\ means only in the root, so implies that \sub1 in the root must be copied.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5895
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.55rc1] Copy with filter "somedir1\**\" copies whole folder structure

Post by *white »

ghisler(Author) wrote: 2025-05-23, 07:43 UTC Filter \sub1\sub2\sub3\sub4\sub5\ means only in the root, so implies that \sub1 in the root must be copied.
That doesn’t make sense. When a user enters “\sub1\sub2\sub3\sub4\sub5\” in “Only files of this type,”, he means the exact specified path, not partial paths "\sub1\", "\sub1\sub2\", etc. If you interpret it as including parent folders, you’d also need to copy their files, which doesn’t happen (and search also doesn't work that way). The filter should copy nothing if the specified path isn’t found.
User avatar
AntonyD
Power Member
Power Member
Posts: 1636
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.55rc1] Copy with filter "somedir1\**\" copies whole folder structure

Post by *AntonyD »

The filter should copy nothing if the specified path isn’t found
absolutely right!
#146217 personal license
JOUBE
Power Member
Power Member
Posts: 1680
Joined: 2004-07-08, 08:58 UTC

Re: [TC 11.55rc1] Copy with filter "somedir1\**\" copies whole folder structure

Post by *JOUBE »

How does Windows actually react to that incorrect/accidental entry of this "**"? It's painful to look at...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50703
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.55rc1] Copy with filter "somedir1\**\" copies whole folder structure

Post by *ghisler(Author) »

The filter should copy nothing if the specified path isn’t found
OK, I have changed it as requested in RC4. Please test it!
25.05.25 Fixed: When using a copy filter with included directories (like *.pdf \dir1\dir2\ ), do not copy dir1 when dir2 doesn't exist (32/64)
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5895
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.55rc1] Copy with filter "somedir1\**\" copies whole folder structure

Post by *white »

Tested OK using TC 11.55rc4 32-bit and 64-bit.

Moderator message from: white » 2025-05-27, 15:49 UTC

Moved topic
» from TC11.x bug reports (English) to TC Fixed bugs
Post Reply