Skip to content

Fix disk usage calculation and regex pattern#280

Open
sclarkca wants to merge 1 commit into
gao-sun:masterfrom
sclarkca:fix/disk-usage-regex
Open

Fix disk usage calculation and regex pattern#280
sclarkca wants to merge 1 commit into
gao-sun:masterfrom
sclarkca:fix/disk-usage-regex

Conversation

@sclarkca
Copy link
Copy Markdown

Summary

  • Fix [bug] Incorrect disk usage #250: Change default disk stats to use root volume "/" instead of summing all volumes from /Volumes, which was incorrectly including external drives and DMG mounts
  • Fix invalid NSRegularExpression pattern / +/g (JavaScript-style syntax) to use Swift split(separator:) directly

Changes

  • eul/Store/DiskStore.swift: Added rootAttributes fallback that reads from root path "/" when no disk is selected
  • SharedLibrary/Extension/String.swift: Simplified splittedByWhitespace - removed broken regex, using split(separator:) directly

- Change default disk stats to use root volume "/" instead of summing
  all volumes from /Volumes, which included external drives (fixes gao-sun#250)
- Fix invalid NSRegularExpression pattern "/ +/g" (JS-style) to use
  Swift's split(separator:) directly
@github-actions github-actions Bot added the needs review PR needs review label May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review PR needs review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Incorrect disk usage

1 participant