Skip to content

Commit

Permalink
fix: Windows related path
Browse files Browse the repository at this point in the history
  • Loading branch information
DPS0340 committed Jul 1, 2024
1 parent 00efbf0 commit 0b84666
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub const DEFAULT_DATA_DIRNAME: &str = "data";
pub const DEFAULT_CONFIG_BASEPATH: &str = "/var/lib/rrdb";

#[cfg(target_os = "windows")]
pub const DEFAULT_CONFIG_BASEPATH: &str = "C:\\Program Files\\rrdb";
pub const DEFAULT_CONFIG_BASEPATH: &str = r"C:\Program Files\rrdb";

#[cfg(target_os = "macos")]
pub const DEFAULT_CONFIG_BASEPATH: &str = "/var/lib/rrdb";
Expand Down
2 changes: 1 addition & 1 deletion src/executor/initializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ WantedBy=multi-user.target"#;

#[cfg(target_os = "windows")]
async fn create_daemon_config_if_not_exists(&self) -> Result<(), RRDBError> {
let output = Command::new("sc.exe").args(["create", "rrdb", "binpath=", "'C:\Program Files\rrdb\rrdb.exe'"]).output();
let output = Command::new("sc.exe").args(["create", "rrdb", "binpath=", r"'C:\Program Files\rrdb\rrdb.exe'"]).output();

self.check_output_status(output)
}
Expand Down

0 comments on commit 0b84666

Please sign in to comment.