Thumbnail

rani/cscroll.git

Clone URL: https://git.buni.party/rani/cscroll.git

commit beccc6bdbd30810370832768f4befe47e2a05b57 Author: Raniconduh <clagv.randomgames@gmail.com> Date: Sun Oct 10 21:45:17 2021 +0000 use full path of command as opposed to relative path diff --git a/src/commands.c b/src/commands.c index cdcbca2..46b8d25 100644 --- a/src/commands.c +++ b/src/commands.c @@ -510 +515 @@  #include "commands.h"    void ext_open(char * file) { + char * f = malloc(strlen(cwd) + strlen(f) + 2); + sprintf(f, "%s/%s", cwd, file); +   pid_t pid = fork();   if (!pid) { - execvp("xdg-open", (char*[3]){"xdg-open", file, NULL}); + execvp("xdg-open", (char*[3]){"xdg-open", f, NULL});   exit(0);   } + + free(f);  }