Skip to content

Commit

Permalink
chore: Update TS_LOCATION path for test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
LeChatP committed Sep 23, 2024
1 parent c75b2f8 commit 8a97a5c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sr/timeout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ fn write_lockfile(lockfile_path: &Path) {
.expect("Failed to write to lockfile");
}

#[cfg(not(test))]
const TS_LOCATION: &str = "/var/run/rar/ts";
#[cfg(test)]
const TS_LOCATION: &str = "target/ts";

fn read_cookies(user: &Cred) -> Result<Vec<CookieVersion>, Box<dyn Error>> {
let path = Path::new(TS_LOCATION).join(user.user.uid.as_raw().to_string());
Expand Down

0 comments on commit 8a97a5c

Please sign in to comment.