Browse Source

Fixed running programs from other directories in Linux

Arthur Yefimov 3 năm trước cách đây
mục cha
commit
98c2f7542f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/term/term_linux.c

+ 1 - 1
src/term/term_linux.c

@@ -54,7 +54,7 @@ int StartProcessIn(char *process, char *dir) {
       }
       close(q[1]);
       close(p[0]);
-      if (dir && dir[0] != '\0') {
+      if (process && process[0] != '/' && dir && dir[0] != '\0') {
         if (getcwd(cmd, 256) == NULL) {
           perror("StartProcessIn: Could not getcwd()");
         }