Skip to content

Commit

Permalink
firecfg: Only use fix_desktop_files automatically when run through su…
Browse files Browse the repository at this point in the history
…do (#3382)

* firecfg: Only use fix_desktop_files when --fix is specified

* firecfg: Only use fix_desktop_files automatically when run through sudo
  • Loading branch information
backspac committed Jun 4, 2020
1 parent 2c914c7 commit 61260a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/firecfg/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,9 @@ int main(int argc, char **argv) {
if (arg_debug)
printf("%s %d %d %d %d\n", user, getuid(), getgid(), geteuid(), getegid());

// fix .desktop files in ~/.local/share/applications directory
fix_desktop_files(home);
// if runs as regular user, fix .desktop files in ~/.local/share/applications directory
if (getuid() != 0)
fix_desktop_files(home);

return 0;
}

0 comments on commit 61260a6

Please sign in to comment.