Search via circular links
Moderators: Hacker, petermad, Stefan2, white
Search via circular links
When searching on entire disk in Windows 7 and in TC8.0beta14 (also in TC7.56a) Total commander is trapped in circular links like e.g. c:\Users\%username%\AppData\Local\Application Data\ (which points to parent c:\Users\%username%\AppData\Local\) and it finds many duplicated files/folders which are in fact same files/folders. It is currently only stopped by MAX_PATH. Anyway it is uncomfortably few times slower and result has to be manually filtered for duplicates.
I recommend testing if folder is actually link and pass through it only once (or 0 times - could be an option because it usually points to other folder on the same disk which is passed anyway). As number of links is relatively small (<20) it may not slow down searching at all.
In the future you should consider Total commander to contain builtin support for these links (creating, deleting, modifying target) and correct handling in all batch operations (copying, moving, deleting files inside linked folders) as well as for other advanced features of NTFS (e.g. permissions - see my other message).
Thanks
I recommend testing if folder is actually link and pass through it only once (or 0 times - could be an option because it usually points to other folder on the same disk which is passed anyway). As number of links is relatively small (<20) it may not slow down searching at all.
In the future you should consider Total commander to contain builtin support for these links (creating, deleting, modifying target) and correct handling in all batch operations (copying, moving, deleting files inside linked folders) as well as for other advanced features of NTFS (e.g. permissions - see my other message).
Thanks
ignore list doesn't help in all cases
Though ignore list seems to be a good workaround it doesn't help here in general. Having multiple users either all users' Application data folders have to be included in ignore list (when using absolute paths) or Application data is not visible in any other situations any more (when using relative paths).
Anyway, thanks for suggestion of workaround till it gets fixed with universal solution.
Anyway, thanks for suggestion of workaround till it gets fixed with universal solution.
- ghisler(Author)
- Site Admin
- Posts: 50548
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
This is a known problem which CANNOT be fixed. It happens only with links where Total Commander isn't allowed to read the target location, but is allowed to list the files inside. To avoid the problem, you need to give yourself the right to read from the link.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Here's screenshot of "dir /aH" - it has target location:
Image: http://01.sk/tcmd-junctions1.png
Same result with NL_Info content plugin (https://plugins.ghisler.com/content/wdx_nl_info.zip):
Image: http://01.sk/tcmd-junctions2.png
The only junction without target location is c:\Users\All Users\ (readable in "dir" but not in NL_Info):
Image: http://01.sk/tcmd-junctions3.png
Image: http://01.sk/tcmd-junctions4.png
Image: http://01.sk/tcmd-junctions1.png
Same result with NL_Info content plugin (https://plugins.ghisler.com/content/wdx_nl_info.zip):
Image: http://01.sk/tcmd-junctions2.png
The only junction without target location is c:\Users\All Users\ (readable in "dir" but not in NL_Info):
Image: http://01.sk/tcmd-junctions3.png
Image: http://01.sk/tcmd-junctions4.png
- ghisler(Author)
- Site Admin
- Posts: 50548
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
2mkobylan
It looks like you checked the permissions in the wrong directory. Please check them in
c:\Users\%username%\AppData\Local
According to your first post, the link "Application Data" seems to have that problem.
It looks like you checked the permissions in the wrong directory. Please check them in
c:\Users\%username%\AppData\Local
According to your first post, the link "Application Data" seems to have that problem.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
mkobylan
Symbolic links are supported since NL_info 1.20. You are probably using an older version.
ghisler(Author)
It seems that this problem occurs in some specific configuration of links/junctions. I cannot reproduce the problem with AppData, but I have a self-made link in Documents\Incoming that points to Documents, and when I'm searching TC starts an endless loop, going deeper and deeper, though all the link targets are readable. However, when I tried to construct a simplified structure of folders/links for posting it here, I failed to make TC cycle.
So, either there are some specific permissions that do not prevent reading the link targets but nonetheless affect TC behaviour somehow, or some other links (that are already present in the directory) produce unpredicted influence. I'll try to find out how to duplicate a problematic directory tree.
Symbolic links are supported since NL_info 1.20. You are probably using an older version.
ghisler(Author)
It seems that this problem occurs in some specific configuration of links/junctions. I cannot reproduce the problem with AppData, but I have a self-made link in Documents\Incoming that points to Documents, and when I'm searching TC starts an endless loop, going deeper and deeper, though all the link targets are readable. However, when I tried to construct a simplified structure of folders/links for posting it here, I failed to make TC cycle.
So, either there are some specific permissions that do not prevent reading the link targets but nonetheless affect TC behaviour somehow, or some other links (that are already present in the directory) produce unpredicted influence. I'll try to find out how to duplicate a problematic directory tree.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
It is quite easy. E.g.:However, when I tried to construct a simplified structure of folders/links for posting it here, I failed to make TC cycle.
1. Folder F:\TEMP\0\1
2. Junction F:\TEMP\0\1\2 that points to F:\TEMP\0
3. Put some files to folder F:\TEMP\0.
4. Use search in F:\TEMP\0:
Code: Select all
F:\TEMP\0\1\
F:\TEMP\0\1\2\
F:\TEMP\0\1\2\0\
F:\TEMP\0\1\2\0\1\
F:\TEMP\0\1\2\0\1\2\
F:\TEMP\0\1\2\0\1\2\0\
F:\TEMP\0\1\2\0\1\2\0\1\
F:\TEMP\0\1\2\0\1\2\0\1\2\
F:\TEMP\0\1\2\0\1\2\0\1\2\0\
F:\TEMP\0\1\2\0\1\2\0\1\2\0\1\
F:\TEMP\0\1\2\0\1\2\0\1\2\0\1\2\
F:\TEMP\0\1\2\0\1\2\0\1\2\0\1\2\0\
F:\TEMP\0\1\2\0\1\2\0\1\2\0\1\2\0\1\
F:\TEMP\0\1\2\0\1\2\0\1\2\0\1\2\0\1\2\
F:\TEMP\0\1\2\0\1\2\0\1\2\0\1\2\0\1\2\0\
F:\TEMP\0\1\2\0\1\2\0\1\2\0\1\2\0\1\2\0\1\
F:\TEMP\0\1\2\0\1\2\0\1\2\0\1\2\0\1\2\0\1\2\
F:\TEMP\0\1\2\0\1\2\0\1\2\0\1\2\0\1\2\0\1\2\0\
...
- ghisler(Author)
- Site Admin
- Posts: 50548
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I just checked it - the infinite loop detection code is there, but it isn't called (because the reparse point flag isn't stored when reading the directory). I will fix it. The code works correctly for example in branch view (Ctrl+B) or when using SPACEBAR to count the size.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I have set all permissions on entire C:\ to Everyone Full control (from outside) because I had some issues with default settings. It seems that better way would be to switch to FAT32
.
=>Permissions are same for my account as well as for Default user account. I just thought it would be simpler to not erase my user name from screenshot in so many places so I posted Default user screenshot.
Though special folder permissions or 'infinite loop detection' fallback are useful for unknown problems, we may need to implement special handling for reparse points in the future.
I have installed NL_Info 1.02 which was linked from TCMD addons page. After installing 1.11 from http://flint-inc.ru/files/mlang/nlinfo_1.11.rar however it didn't tell me more about reparse point target of c:\Users\All Users.
SPACEBAR and CTRL+B also enters this 'almost infinite' loop in my case.

=>Permissions are same for my account as well as for Default user account. I just thought it would be simpler to not erase my user name from screenshot in so many places so I posted Default user screenshot.
Though special folder permissions or 'infinite loop detection' fallback are useful for unknown problems, we may need to implement special handling for reparse points in the future.
I have installed NL_Info 1.02 which was linked from TCMD addons page. After installing 1.11 from http://flint-inc.ru/files/mlang/nlinfo_1.11.rar however it didn't tell me more about reparse point target of c:\Users\All Users.
SPACEBAR and CTRL+B also enters this 'almost infinite' loop in my case.
You may try my NTLinks, it supports symlinks too.
But the reason of your problem is that you messed all permissions up. It is not safe to do this, default settings forbid writes to system folders for regular users, only admins can do it (UAC forbids such writes even for regular admin apps that are not elevated for further security).
And, now you know how to resolve your problem - just forbid to list folder contents for theese reparse points for special user Everyone, they are left for compatibility only (they allow old programs to open files via old-style paths), you shouldn't use them at all.
But the reason of your problem is that you messed all permissions up. It is not safe to do this, default settings forbid writes to system folders for regular users, only admins can do it (UAC forbids such writes even for regular admin apps that are not elevated for further security).
And, now you know how to resolve your problem - just forbid to list folder contents for theese reparse points for special user Everyone, they are left for compatibility only (they allow old programs to open files via old-style paths), you shouldn't use them at all.
The homepage is not up-to-date yet. The latest version is 1.20, can be taken from totalcmd.net.mkobylan wrote:I have installed NL_Info 1.02 which was linked from TCMD addons page. After installing 1.11 from http://flint-inc.ru/files/mlang/nlinfo_1.11.rar however it didn't tell me more about reparse point target of c:\Users\All Users.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
- ghisler(Author)
- Site Admin
- Posts: 50548
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Could someone test whether this works correctly now, please?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com