Skip to content

Deep log scan: stop following junction folders and cloud placeholders - #7

Closed
wowjf wants to merge 1 commit into
Multron-Community:betafrom
wowjf:fix-deep-log-link-follows
Closed

wowjf wants to merge 1 commit into
Multron-Community:betafrom
wowjf:fix-deep-log-link-follows

Conversation

@wowjf

@wowjf wowjf commented Oct 23, 2026

Copy link
Copy Markdown
Member

The deep log scan walks the drive with plain Directory.GetDirectories /Directory.GetFiles, and those still return junction folders and cloud placeholder files. The other scans in the app skip reparse points (the ScanEnumeration field at the top of this file, the options in Duplicate File Finder and Clean.DeleteEmptyDirectories), so I think this one just got missed.

What this changes in practice today:

  • A junction like C:\Users\me\Desktop\backup -> D:\stuff gets walked through, and the .log/.tmp/.bak files found on the other drive end up in the deep log list and in the clean, although the scan only says it checked C:. With Secure Delete on, the overwritten data is on that other drive, not on C:.
  • Files inside OneDrive folders are reparse points too, so the scan lists them and a clean deletes them; once a placeholder is deleted the cloud copy goes with it. Same family as It caused OneDrive get logged out and need to sign in and resync #3 (that one was handled on the database side), just reached through the app this time.
  • A looping junction pair makes the walk recurse into the same folders over and over until the path gets too long, so a scan can sit there for way too long.

The fix is small: the deep log scan now enumerates with reparse points skipped, like every other scan here. Hidden and System files stay excluded exactly the way the plain overloads did it, so the results don't change in any other way.

@winball501

winball501 commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

The deep log scan doesn't use the database; it's a fixed walk of C: that only picks the log extensions from Settings. Issue #3 came from a database rule deleting OneDrive's own files, so it's a different problem.

The built-in Windows junctions (Application Data, Documents and Settings) already deny listing, so the scan never entered them. The real cases are junctions a user created themselves, which the scan does follow today, and C:\Users\All Users, a Windows link to C:\ProgramData that the scan walks a second time, counting those logs twice.

@winball501

winball501 commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Thanks for taking a look, if you find any other issues please feel free to submit a commit.

I closed it because the new options also skip Hidden and System entries. The plain overloads didn't skip them, so the scan would stop walking into hidden folders such as C:\ProgramData (and AppData on most installs). On a test machine the deep log results dropped from 312 MB to 90 MB. Skipping only ReparsePoint keeps every real file and is the version I'd take.

@winball501 winball501 closed this Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants