Skip to content

fix(dgw): support network drives and UNC paths for recording storage space on Windows#1729

Merged
Benoît Cortier (CBenoit) merged 3 commits intomasterfrom
DGW-354
Mar 27, 2026
Merged

fix(dgw): support network drives and UNC paths for recording storage space on Windows#1729
Benoît Cortier (CBenoit) merged 3 commits intomasterfrom
DGW-354

Conversation

@CBenoit
Copy link
Copy Markdown
Member

Issue: DGW-354

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Devolutions Gateway’s heartbeat recording-storage health reporting to correctly determine disk space on Windows when the recording path is on a UNC share or mapped network drive (DGW-354).

Changes:

  • Refactors disk space lookup into query_storage_space, using GetDiskFreeSpaceExW on Windows and sysinfo mount-point matching elsewhere.
  • Improves “no disk space” logging by including a short failure reason and reducing repeated WARN noise.
  • Adds basic tests for writable temp dirs and nonexistent paths; introduces tempfile for test setup.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
devolutions-gateway/src/api/heartbeat.rs Implements Windows-specific free-space query via GetDiskFreeSpaceExW, refactors storage querying, updates logging, adds tests.
devolutions-gateway/Cargo.toml Adds windows-sys (Windows-only) and tempfile (dev-dependency) needed by the new code/tests.
Cargo.lock Updates lockfile for the newly added dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@CBenoit Benoît Cortier (CBenoit) merged commit f2da923 into master Mar 27, 2026
41 checks passed
@CBenoit Benoît Cortier (CBenoit) deleted the DGW-354 branch March 27, 2026 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants