Infinite Loop with NTFS junctions
See original GitHub issueOn some Windows servers I’m experiencing an infinite loop:
c:\Documents and Settings\WINDOWS_ACCOUNT_HERE\AppData\Local\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Microsoft\Windows\History\History.IE5
or
c:\Users\XXXXXX\Application Data\Application Data\Application Data\Application Data\Application Data.…
This is my workaround:
private boolean isExcludedDirectory(String path) {
if (isWindows && path.toUpperCase().indexOf("$RECYCLE.BIN") == 3)
return true;
//Infinite loop on some systems
if (isWindows && path.toUpperCase().endsWith("\\APPLICATION DATA\\APPLICATION DATA"))
return true;
return (path.equals("/proc") || path.startsWith("/proc/")) || (path.equals("/sys") || path.startsWith("/sys/"))
|| (path.equals("/dev") || path.startsWith("/dev/")) || (path.equals("/run") || path.startsWith("/run/"))
|| (path.equals("/var/run") || path.startsWith("/var/run/"));
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Robocopy gets into infinite loop on NTFS Junction points
It turns out that robocopy can get stuck in an infinite loop on the junction point if you are copying windows users. You...
Read more >Indexer can get caught in an infinite loops of NTFS junctions ...
There are a couple of obvious solutions: Don't traverse past reparse points. This is easy to implement, but prevents indexing through all ...
Read more >Can an infinite loop in junction point folders cause missing disk
Yes, this is a classic infinite Loop that can be caused by running a program that is not aware of Soft Links (Junction...
Read more >Many/many files, long path names, NTFS junction ... - voidtools
10+ million files is no problem. Long path names. No problem. NTFS junction loops? Everything doesn't "follow" junctions, so no loops .
Read more >View topic - NTFS junctions - infinite loop - ClamWin Free Antivirus
Hi, I have an NTFS filesystem with some junction points in it: c:\junctions\c-drive -> c:\ c:\junctions\d-drive -> d:\ clamscan is not alone in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Update - there is an official update out that avoids this “ReparsePoint” - better to use that than the fix above.
yeh - we’re just compiling an exe and will be running this against our 8,000 servers