mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5226] [MERGED] fix(desktop): disk space detection on overlay fs #5113
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5113
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?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5226
Author: @CuriousCorrelation
Created: 7/7/2025
Status: ✅ Merged
Merged: 7/11/2025
Merged by: @jamesgeorge007
Base:
patch← Head:fix-desktop-disk-space-detection-on-overlayfs📝 Commits (2)
a0e0f36fix(desktop): disk space detection on overlay fsbe49257fix(desktop): canonicalize storage path once📊 Changes
9 files changed (+37 additions, -31 deletions)
View changed files
📝
packages/hoppscotch-common/package.json(+1 -1)📝
packages/hoppscotch-desktop/package.json(+1 -1)📝
packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/LICENSE.md(+1 -1)📝
packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/README.md(+1 -1)📝
packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/lib.rs(+1 -1)📝
packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/manager.rs(+23 -17)📝
packages/hoppscotch-desktop/src-tauri/Cargo.lock(+1 -1)📝
packages/hoppscotch-desktop/src-tauri/Cargo.toml(+1 -1)📝
pnpm-lock.yaml(+7 -7)📄 Description
This fixes the storage manager incorrectly reporting 0 bytes available space on systems with overlay filesystems like
composefs, which was causing "Insufficient disk space" errors even when adequate storage exists.Closes FE-911
Closes #5182
The issue occurred because the disk matching logic used
starts_withto find mount points containing the storage path, which would match the root filesystem (/) before finding the actual underlying filesystem with available space. On systems with overlay filesystems, the root mount point shows0available space even if the actual storage location has plenty of space.What's changed
This updates the disk matching logic in the
ensure_spacemethod to find the most specific (longest) mount point that contains the storage path rather than the first match. The fix filters disks where the storage path starts with the mount point and selects the disk with the longest matching mount point path.For example, on the affected system the storage path (see the listed issue)
/home/user/.config/appwould previously match thecomposefsroot/(0 bytes available) instead of the underlying filesystem/var/home(748G available).Notes to reviewers
This change preserves existing functionality for standard filesystem layouts and handles edge cases where canonicalization fails.
Testing should verify that disk space detection works correctly on both standard fs and systems with overlay fs like composefs, mainly on UBlue Fedora Bazzite (where the original issue was reported), should also work with NixOS.
The fix should now correctly identify the underlying filesystem with actual available space instead of overlay filesystems with 0 capacity.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.