Searching ends up in loop

Things you’d like to miss in the future...
Post Reply
Stretto
Posts: 108
Joined: 30 Jan 2012 06:43

Searching ends up in loop

Post by Stretto »

I have some links in folders and when I search XYplorer is ending up in an endless search loop.

e.g.,

C:\A\B\A\B\A\B\A\B\A\B\A\B\A...

XYplorer should be easily able to detect loops like this and avoid them. This is with follow links checked and unchecked... I don't remember it doing this before and I did recently mess with the search settings(for caching).

In any case it should never loop like this, there is no point and it is pointless. Besides the obvious infinite loop it wouldn't actually ever give any additional search results.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Searching ends up in loop

Post by admin »

If this happens with "follow folder links" unchecked then links are not the cause of it. Begs the question what IS the cause? :eh:

Stretto
Posts: 108
Joined: 30 Jan 2012 06:43

Re: Searching ends up in loop

Post by Stretto »

B:\Projects\DRepos\BProjects\DRepos\BProjects\DRepos\BProjects\DRepos\BProjects\DRepos\BProjects\DRepos\BProjects\DRepos\BProjects\DRepos\BProjects\DRepos\BProjects\DRepos\BSoftware\DRepos\BSoftware\DRepos\BSoftware\DRepos\sumatrapdf-master\dbg

It's not about it following the links, it's about their being a circular reference and xyplorer not detecting it. What is strange is that it breaks out in some way... not sure how(could just be some weird issue with the way the directories are ordered). Of course, I end up with about a billion of these enteries.

Regardless of any settings, xyplorer needs to check if a directory it is going to recurse into has already been entered. Circular loops are always invalid. It doesn't just need to follow links, it needs to only follow links that haven't already been explorer, else it is circular and invalid(always, no ifs ands or buts).

To make this absolutely valid one has to track all directories entered and mark them if they have been entered, if so then do not enter it again. e.g., if dirs[entering_dir] then continue/skip/next; dirs[entering_dir] = true;

but entering_dir needs to be resolved if it is a link/junction. To save space the above dictionary only needs to be used when entering_dir is a link/junction since it will always be false for others.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Searching ends up in loop

Post by admin »

XY does this kind of checking for junctions. So what kind of reference makes your circle?

Stretto
Posts: 108
Joined: 30 Jan 2012 06:43

Re: Searching ends up in loop

Post by Stretto »

I just use the ones that XYplorer gives me. I copy the folder(using copy) then I paste special. Almost always it is a junction.

Stretto
Posts: 108
Joined: 30 Jan 2012 06:43

Re: Searching ends up in loop

Post by Stretto »

Ok, it is "follow junctions" in the search options in prefs...

You probably forgot to add the check to that or did it recently?

I believe I enabled that a while by when I changed the search caching... and that is about when I started having the issue. Without it checked it works as expected.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Searching ends up in loop

Post by admin »

Yes, that's it. I'll fix it. :)

BTW, File Explorer has the issue. It lists 22 elements where XYplorer lists 32, when really there is only one in an endless circular reference.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Searching ends up in loop

Post by admin »

Note that the File Explorer tree has no checks at all:
2020-02-13_115634.png
2020-02-13_115634.png (22.2 KiB) Viewed 2790 times
XYplorer currently has neither, but it will later...

Stretto
Posts: 108
Joined: 30 Jan 2012 06:43

Re: Searching ends up in loop

Post by Stretto »

Thanks.

I don't mind about the tree so much since I'm in control. You could just not list the folder a second time though(should be same check code so copy and paste).

Also, maybe you could add a "search junctions too" checkbox like folder links(when I check it the junctions are not searched). It would be easier than having to go in to the options.

Why I say this is because I use junctions a lot to navigate around and also to optimize certain things(like hiding drives) I also have several million files so having more of a fine tune control would be better. In fact, you could remove the pref's option and just stick it in the search tab's with the others?

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Searching ends up in loop

Post by admin »

Ok, saw it. There is a new feature stop while the transition to 64-bit is going on.

Post Reply