This forum uses cookies. Click X button to hide this message. What is stored? / Privacy
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

-Improper handling of invalid paths in search dialog

 
Post new topic   Reply to topic    Total Commander Forum Index -> TC Fixed bugs Printable version
View previous topic :: View next topic  
Author Message
MarcinW
Power Member
Power Member


Joined: 23 Jan 2012
Posts: 836
Location: Poland

PostPosted: Sun May 11, 2014 7:02 pm    Post subject: -Improper handling of invalid paths in search dialog Reply with quote

Steps to reproduce:
1) Create directory C:\TEST1 and place some file there, let's say file.txt.
2) Do NOT create directory C:\TEST2.
3) Press Alt+F7.
4a) Paste in "Search in" field: C:\TEST1;C:\TEST2 and press "Start search" - file.txt will be found (TC ignores invalid C:\TEST2 path).
4b) Paste in "Search in" field: C:\TEST2;C:\TEST1 and press "Start search" - file.txt will NOT be found with message "Search path not found!" (TC does NOT ignore invalid C:\TEST2 path).

Maybe TC should display error message only when all entered paths are invalid.

Regards
Back to top
View user's profile Send private message Send e-mail
Gral
Power Member
Power Member


Joined: 26 Jan 2005
Posts: 601

PostPosted: Sun May 11, 2014 11:14 pm    Post subject: Reply with quote

It's even more interesing if you search for FILE.TXT in:
C:\TEST1;C:\TEST2;C:\TEST3
while
C:\TEST1 is empty
C:\TEST2 doesn't exists
C:\TEST3 contains FILE.TXT
It seems only first path must be valid.
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35752
Location: Switzerland

PostPosted: Mon May 12, 2014 4:08 am    Post subject: Reply with quote

Yes, TC only checks the first path when starting the search. This is by design. The check is just a convenience for the not so experienced user to warn why there is no result. Currently there are no plans to check all the paths.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MarcinW
Power Member
Power Member


Joined: 23 Jan 2012
Posts: 836
Location: Poland

PostPosted: Mon May 12, 2014 5:51 am    Post subject: Reply with quote

This could be very useful if TC could continue even when the first path is invalid. Currently I have a search scheme saved (in Load/Save tab) and, after deleting one of directories (the first only), I can't search in others. After deleting a directory other than the first, I can work with saved search scheme without any problem.

I know, that in this case the search scheme becomes "invalid" and should be corrected. But when the directory has been deleted for a moment only (and will be restored from a backup soon), it would be useful to still be able to perform the search.

In all cases TC must parse the "Search in" field, so all the code is already inside TC. Adding one variable (let's say FoundAnyValidDir : Boolean), initially set to False, but set to True whenever TC finds a valid directory, would solve this problem completely in 1 minute. Please consider adding this functionality.

Regards
Back to top
View user's profile Send private message Send e-mail
Gral
Power Member
Power Member


Joined: 26 Jan 2005
Posts: 601

PostPosted: Mon May 12, 2014 10:17 pm    Post subject: Reply with quote

Although i understand how it's works, i don't understand why works this way.
I totally agree with MarcinW. TC should try to search through all valid paths.

ghisler(Author) wrote:

...
The check is just a convenience for the not so experienced user to warn why there is no result.
...


This is not true - the check itself is the only reason why nothing is found!
There is not result because TC didn't even try to search all paths!

Imagine: less or more experienced user enter to directory C:\TEST3 and start search by typing -
Search for: FILE.TXT (visible in directory TEST3)
Search in: C:\TEST1;C:\TEST2C:\TEST3 (while TEST1 doesn't exist)
Result: Nothing is found!
Try to explain this - why TC cannot find definitely existing file?

 
Back to top
View user's profile Send private message
petermad
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 7794
Location: Valsted, Denmark

PostPosted: Tue May 13, 2014 2:59 pm    Post subject: Reply with quote

I agree that the current behaviour is extremely unexpected and not logic.
_________________
#524
Danish Total Commander Translator
TC 9.20rc1 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit. TC 2.91b3 on Android 6.0

Get Extended Total Commander Menus
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MarcinW
Power Member
Power Member


Joined: 23 Jan 2012
Posts: 836
Location: Poland

PostPosted: Thu Jun 14, 2018 4:55 am    Post subject: Reply with quote

This is fixed now - thanks!

Can be moved to "Fixed Bugs".
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC Fixed bugs All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Imprint/Impressum: This site is maintained by Ghisler Software GmbH
Privacy Policy | Datenschutzerklärung | Politique de Confidentialité

Using phpBB © phpBB Group