mirror of
https://github.com/Comfy-Org/desktop.git
synced 2026-11-04 23:47:43 +00:00
[GH-ISSUE #1403] Disk space validation can falsely fail when fsSize mount paths don’t match install path #399
Labels
No labels
area: desktop-app
Bounty
bug
bug-cop:answered
bug-cop:response-received
component: installer
component: preload
custom node
dependencies
Design
documentation
duplicate
enhancement
expected
frontend
good first issue
installation
Low-Priority
performance
Planned
platform: cross-platform
platform: windows
Potential Bug
Potential Bug
pull-request
question
refactor
Release
stale
User Support
V1
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/desktop#399
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @benceruleanlu on GitHub (Nov 19, 2025).
Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/1403
Summary
VALIDATE_INSTALL_PATHrelies onsysteminformation.fsSize()+ mount comparison to pick a disk and compute free space. On some platforms/layouts (especially macOS APFS and paths under symlinks or non-trivial mountpoints), this match can fail, leavingfreeSpaceat-1and causing valid install locations to be rejected.Current behavior
In
src/handlers/pathHandlers.ts:normalizeMountPoint()normalizesdisk.mountandnormalizePathForComparison()normalizes the user-chosen path.result.freeSpacestays at-1(the initial value), and later the validation logic does:freeSpace === -1⇒< requiredSpaceand the path is treated as invalid, even if there is plenty of disk space.Why this is fragile
The matching assumes that
disk.mountis a simple ancestor of the install path in filesystem terms. That’s not always true:/System/Volumes/Datawhile user paths are under/Users/....fsSize().mountdoes not appear as a simple prefix.In those cases the code doesn’t find any disk,
freeSpacestays-1, and users see a spurious “insufficient free space” error.Expected behavior
// system drive) whenfsSize()returns data but the heuristic fails, orfreeSpace === -1as “unknown” and not a hard error (or at least only show a warning rather than blocking installation).Possible fixes
A few options (not mutually exclusive):
Fallback to a default disk when no mount matches
disks.find(...), if no disk is found, pick a fallback (e.g. the disk whosemount === '/'on POSIX, or the disk whose mount matches the system drive on Windows) and use itsavailablevalue.Change the semantics of
freeSpace === -1VALIDATE_INSTALL_PATH, treatfreeSpace === -1as “unknown” instead of “0”, so it doesn’t trigger thefreeSpace < requiredSpacebranch.InstallLocationPicker.vue) could show a softer warning like “Could not determine free space” instead of a blocking error.Improve mount/path matching
fs.stat/statfs-style information or realpath resolution to map the chosen directory to a device, then compare againstfsSize()results instead of relying entirely on path prefixes.Impact
Suggested work
tests/unit/handlers/pathHandler.test.tsthat simulate:fsSize()returning a mount that doesn’t look like a prefix of the install path.freeSpaceremaining-1and verifying we don’t block installation solely because space is unknown.┆Issue is synchronized with this Notion page by Unito
@dosubot[bot] commented on GitHub (Feb 18, 2026):
Hi, @benceruleanlu. I'm Dosu, and I'm helping the desktop team manage their backlog and am marking this issue as stale.
Issue Summary:
Next Steps:
Thank you for your understanding and contribution!