Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dgw): better custom recording paths handling in heartbeat endpoint #1097

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions devolutions-gateway/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ thiserror = "1"
typed-builder = "0.19"
backoff = "0.4"
sysinfo = "0.30"
dunce = "1.0"

# Security, crypto…
picky = { version = "7.0.0-rc.9", default-features = false, features = ["jose", "x509", "pkcs12"] }
Expand Down
5 changes: 2 additions & 3 deletions devolutions-gateway/src/api/heartbeat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,12 @@ pub(super) async fn get_heartbeat(
let (recording_storage_total_space, recording_storage_available_space) = if sysinfo::IS_SUPPORTED_SYSTEM {
trace!("System is supporting listing storage disks");

let recording_path = conf
.recording_path
.canonicalize()
let recording_path = dunce::canonicalize(&conf.recording_path)
.unwrap_or_else(|_| conf.recording_path.clone().into_std_path_buf());

let disks = Disks::new_with_refreshed_list();

debug!(recording_path = %recording_path.display(), "Search mount point for path");
debug!(?disks, "Found disks");

let mut recording_disk = None;
Expand Down