| View previous topic :: View next topic |
| Author |
Message |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4534 Location: Russian Federation
|
Posted: Sun Jul 22, 2012 6:30 am Post subject: Pack from search results: TC passes items multiple times |
|
|
Suppose you have folder 111 with subfolder 222 with subfolder 333 with files aaa.txt and bbb.txt. Enter folder 111 and search all items in it:
| Code: | F:\TEMP\_tc1\111\222\
F:\TEMP\_tc1\111\222\333\
F:\TEMP\_tc1\111\222\333\aaa.txt
F:\TEMP\_tc1\111\222\333\bbb.txt |
Now select all items and try to pack them into ZIP archive. TC will try to pack every file three times. And same problem exists for any packer (some packers show a warning, some packers pack files multiple times, some show an error). I think TC should filter out files whose path include already enumerated folders. Yes, it may be done on a plugin side but here some cons:
1. This should be done in every packer plugin instead of single place in TC.
2. TC has small folder list and filelist so it is easy to check if file path starts with some path from the list of selected folders, while plugin get huge enumerated filelist and need to search for duplicate lines in it. _________________ VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo…
Last edited by MVV on Sun Jul 22, 2012 7:20 am; edited 1 time in total |
|
| Back to top |
|
 |
MaxX Senior Member


Joined: 23 Mar 2012 Posts: 311
|
Posted: Sun Jul 22, 2012 7:00 am Post subject: |
|
|
Confirm!
TC 8.01 RC4 |
|
| Back to top |
|
 |
white Power Member


Joined: 19 Nov 2003 Posts: 1305 Location: Netherlands
|
Posted: Sun Jul 22, 2012 10:56 am Post subject: Re: Pack from search results: TC passes items multiple times |
|
|
| MVV wrote: | Now select all items and try to pack them into ZIP archive. TC will try to pack every file three times.
|
If you have Recursively pack subdirectories enabled, then that is exactly what you instructed what should happen. _________________ #16626 Personal licence |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4534 Location: Russian Federation
|
|
| Back to top |
|
 |
white Power Member


Joined: 19 Nov 2003 Posts: 1305 Location: Netherlands
|
Posted: Sun Jul 22, 2012 11:52 am Post subject: |
|
|
| MVV wrote: | TC should know that it enumerates same folder twice regardless of that checkbox.
|
I disagree. TC should do exactly as told.
| MVV wrote: | And, BTW, bug may be reproduced regardless of its state.
|
No, if the option is disabled then the files are written twice, which is exactly as designed. _________________ #16626 Personal licence |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4534 Location: Russian Federation
|
Posted: Sun Jul 22, 2012 1:05 pm Post subject: |
|
|
It is absolutely pointless to add exactly same files into same folder of same archive more than once. And it is quite easy to detect that user accidentally (can't imagine another reason) have selected same file more than once. The only thing that should be improved is pack filelist generator.
Regardless of any checkbox state TC asks to overwrite both files when you pack them into ZIP and packs same files multiple times when you pack them e.g. using 7Zip.wcx plugin. _________________ VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo… |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24602 Location: Switzerland
|
Posted: Mon Jul 23, 2012 7:31 am Post subject: |
|
|
Indeed TC is just doing what it is instructed. _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
white Power Member


Joined: 19 Nov 2003 Posts: 1305 Location: Netherlands
|
Posted: Mon Jul 23, 2012 9:47 am Post subject: |
|
|
2MVV
Bare in mind that:- Recursion into subdirectories is done by the packer plugin.
- Packing a folder, by design is interpreted as packing foldername\*.*
_________________ #16626 Personal licence |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4534 Location: Russian Federation
|
|
| Back to top |
|
 |
white Power Member


Joined: 19 Nov 2003 Posts: 1305 Location: Netherlands
|
Posted: Mon Jul 23, 2012 12:16 pm Post subject: |
|
|
| MVV wrote: | Recursion is done by TC, not by packer plugin. When you select directory in a search results, TC enumerates its contents and passes to a plugin, TC doesn't pass just folder path.
|
Yes, you are right. I mixed up packer plugins with external packers. I was thinking of external packers. When using external packers, recursion into subdirectories is done by the external packers. And packing a folder is interpreted as packing foldername\*.*
TC's internal packers and the internal packer that utilizes the packer plugins, emulate the behavior of the external packers. _________________ #16626 Personal licence |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4534 Location: Russian Federation
|
|
| Back to top |
|
 |
white Power Member


Joined: 19 Nov 2003 Posts: 1305 Location: Netherlands
|
Posted: Tue Jul 24, 2012 5:29 am Post subject: |
|
|
| MVV wrote: | It would be much better to filter out duplicate files from the list anyway.
|
While this may be convenient for people who don't realize what they are doing, it would be confusing for people who do and expect the overwrite dialog to appear. Furthermore this would create an inconsistency between internal packers and external packers. _________________ #16626 Personal licence |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4534 Location: Russian Federation
|
|
| Back to top |
|
 |
Valentino Power Member


Joined: 06 Feb 2003 Posts: 665 Location: Ukraine
|
Posted: Wed Jul 25, 2012 4:55 am Post subject: |
|
|
I agree with MVV that TC could optimize the list by removing files that will be packed anyway because their parent folders are in the list (to avoid silly questions about file overwriting itself or to avoid wasting time re-packing these files multiple times) but... mentioned example does not look real to me. If user wants to pack everything in F:\TEMP\_tc1\111\222 he will go to F:\TEMP\_tc1\111 and directs TC to pack 222, or he will go to F:\TEMP\_tc1\111\222, selects everything and directs TC to pack it.
Can you imagine real scenario for this to happen to convince Christian to work on it (although this optimization is so easy that I would just make it instead of talking about it )? |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4534 Location: Russian Federation
|
|
| Back to top |
|
 |
|