Skip to content

Commit

Permalink
fix: correct fallback runtime directory and systemd...
Browse files Browse the repository at this point in the history
...RUNTIME_DIRECTORY environment variable
  • Loading branch information
ryanabx committed Apr 27, 2024
1 parent 32f4621 commit 9cea4a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion profile.d/desktop-entry-daemon.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# set XDG_DATA_DIRS to include desktop-entry-daemon installations
export XDG_DATA_DIRS
XDG_DATA_DIRS="$XDG_DATA_DIRS:$XDG_RUNTIME_DIR/desktop-entry-daemon/"
XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/.cache/desktop-entry-daemon/:$XDG_RUNTIME_DIR/desktop-entry-daemon/"
4 changes: 2 additions & 2 deletions src/tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ fn app_exists(id: &str) -> bool {

pub fn get_dirs() -> (PathBuf, PathBuf, PathBuf) {
let home_str = env::var("HOME").unwrap();
let runtime_dir_str = env::var("RUNTIME_DIR").unwrap_or(format!(
"/run/{}/desktop-entry-daemon/",
let runtime_dir_str = env::var("RUNTIME_DIRECTORY").unwrap_or(format!(
"/run/user/{}/desktop-entry-daemon/",
env::var("UID").unwrap_or("1000".to_string())
));
let tmp_dir = Path::new(&runtime_dir_str);
Expand Down

0 comments on commit 9cea4a6

Please sign in to comment.