Skip to content

Commit 6470b9b

Browse files
snowyuprobonopd
authored andcommitted
* [bug] critical AppRun can not parse exe on desktop file: Error executing '' (#844)
1 parent 99589f8 commit 6470b9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AppRun.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ int main(int argc, char *argv[]) {
7777
snprintf(desktop_file, LINE_SIZE, "%s/%s", appdir, namelist[0]->d_name);
7878
FILE *f = fopen(desktop_file, "r");
7979
char *line = malloc(LINE_SIZE);
80-
char *exe = line+5;
8180
size_t n = LINE_SIZE;
8281

8382
do {
8483
if (getline(&line, &n, f) == -1)
8584
die("Executable not found, make sure there is a line starting with 'Exec='\n");
8685
} while(strncmp(line, "Exec=", 5));
8786
fclose(f);
87+
char *exe = line+5;
8888

8989
// parse arguments
9090
bool in_quotes = 0;
@@ -195,7 +195,7 @@ int main(int argc, char *argv[]) {
195195

196196
/* Run */
197197
ret = execvp(exe, outargptrs);
198-
198+
199199
int error = errno;
200200

201201
if (ret == -1)

0 commit comments

Comments
 (0)