Skip to content

Commit

Permalink
Anonymize .local folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Aragas committed Sep 29, 2024
1 parent b9a14c7 commit 4ab9e40
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/BUTR.CrashReport/Utils/Anonymizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public static string AnonymizePath(string path)
if (entries.FirstOrDefault(x => x.Substring.Equals("steamapps", StringComparison.OrdinalIgnoreCase)) is { } entrySteamapps)
return path.Substring(entrySteamapps.Index);

if (entries.FirstOrDefault(x => x.Substring.Equals(".local", StringComparison.OrdinalIgnoreCase)) is { } entryLocal)
return path.Substring(entryLocal.Index);

if (normalizedPath.StartsWith(Windows, StringComparison.OrdinalIgnoreCase))
return Path.Combine("Windows", normalizedPath.Substring(Windows.Length + 1));

Expand Down

0 comments on commit 4ab9e40

Please sign in to comment.