VFS: clamp S:\ free and total bytes to config.pls_mb in GetDiskFreeSpaceEx (#106) #240
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/243"
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?
Imported from ivall/xcl. Originally posted by slopgobblercobbler on 2026-11-23T21:46:22Z.
Addresses #106 Item 4 (S:\ PLS disk space quota):
In
GetDiskFreeSpaceExWandGetDiskFreeSpaceExA, clamp persistent local storage (S:\) free, total, and available bytes toconfig.pls_mb(or the default 4096 MiB) instead of reporting the unconstrained host NVMe volume size.What is in it
crates/xcl/src/vfs_hooks.rs:is_pls_path()recognizesS:\,s:/,\\?\S:, and subdirectories case-insensitively.clamp_pls_space()caps total and free bytes to the PLS quota without precision loss when host free space is smaller.G:\,T:\,C:\, etc.) completely unchanged.PULARGE_INTEGERout-parameters.disk_free_space_ex_clamps_pls_and_preserves_non_plscovering path variations, quota capping, subpaths, and passthrough.Tested
cargo test -p xcl -- vfs(19 passed, 0 failed).cargo test --workspace(603 passed, 0 failed).Not tested
AI use
author-pls,verify-pls). Verified and reviewed independently.upstream-sync referenced this pull request2026-11-24 06:58:56 +00:00
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-24T10:42:34Z.
Closing as a duplicate of #231, which has already been merged into
main.Pull request closed