[x32] Duplicate search results in search list mode

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
yong
Member
Member
Posts: 110
Joined: 2009-05-20, 07:23 UTC

[x32] Duplicate search results in search list mode

Post by *yong »

Search function (Commands - Search) returns not only the files under the directories included in the search list file, but also other files that meet the "search for" criteria in the current path, and the files that are returned from the search list directories are presented twice, as if they were searched twice: once in the search list mode, then again in the old directory mode.

Win XP SP3 x32
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I cannot confirm that, but I can confirm something else which has probably triggered your report: If the search file ends with a line break, then TC searches also in the directory where the list file is located. If this directory is in the list itself too, then you get the files from that location twice. Example list file
c:\totalcmd<cr><lf>
c:\temp<cr><lf>

Will find files from c:\totalcmd and c:\temp, and also in the directory where the list file is stored. If it's stored in c:\totalcmd or c:\temp, you will get the files in one of these twice.

I will ignore the last line break to fix that.
Author of Total Commander
https://www.ghisler.com
yong
Member
Member
Posts: 110
Joined: 2009-05-20, 07:23 UTC

Post by *yong »

It seems that the problem is caused by the location of the list file: if the list file resides in any parent directory of the search path listed in the file, then the found files are returned twice. Otherwise the files show up only once.

Example list file:
c:\temp\c

Will return *.c files in c:\temp\c once if the list file is in c:\, d:\, c:\temp\c\debug, but twice if the list file is in c:\temp, c:\temp\c. Search command will also return *.c files in other sub-directories of c:\temp once if the list file is in c:\temp.

The line feed <lf> or backslash <'\'> at the end of the line don't seem to cause any problem.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This should be fixed in beta 2, please test it!
Author of Total Commander
https://www.ghisler.com
User avatar
karlchen
Power Member
Power Member
Posts: 4603
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Problem reproduced in Total Commander 8.0 beta1 32-bit on Windows 7 Enterprise SP1, 32-bit.
Problem no longer reproduced in Total Commander 8.0 beta2 32-bit on Windows 7 Enterprise SP1, 32-bit.

So: fix confirmed for Total Commander 8.0 beta2 32-bit

Karl
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
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