Skip to content

Commit ea6fc9d

Browse files
committed
temp dir location
1 parent af6a999 commit ea6fc9d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/common.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ fn get_pid_file_path(name: &str) -> Result<PathBuf, PidFileError> {
6969
let uid = get_current_uid();
7070
let gid = get_current_gid();
7171

72-
let dir = PathBuf::from(format!("/tmp/pqueue-{}", uid));
72+
let temp = std::env::temp_dir();
73+
let dir = PathBuf::from(temp.join(format!("pqueue-{}", uid)));
7374
let perms = Permissions::from_mode(0o700);
7475
if !dir.is_dir() {
7576
std::fs::create_dir(&dir)?;

0 commit comments

Comments
 (0)