bim: fix argument parsing derp
This commit is contained in:
parent
8d9215284e
commit
c5223f6748
13
apps/bim.c
13
apps/bim.c
@ -5887,7 +5887,8 @@ int process_command(char * cmd) {
|
||||
if (c-cmd == 511) break;
|
||||
if (*c == ' ') {
|
||||
cmd_name[c-cmd] = '\0';
|
||||
argv[1] = c+1;
|
||||
while (*c == ' ') c++;
|
||||
argv[1] = c;
|
||||
if (*argv[1]) argc++;
|
||||
break;
|
||||
}
|
||||
@ -10808,13 +10809,21 @@ void import_directory(char * dirName) {
|
||||
dirp = opendir(file);
|
||||
}
|
||||
if (!dirp) {
|
||||
/* Try one last fallback */
|
||||
/* Try /usr/share/bim */
|
||||
if (dirpath) free(dirpath);
|
||||
dirpath = strdup("/usr/share/bim");
|
||||
sprintf(file, "%s/%s", dirpath, dirName);
|
||||
extra = "/";
|
||||
dirp = opendir(file);
|
||||
}
|
||||
if (!dirp) {
|
||||
/* Try one last fallback */
|
||||
if (dirpath) free(dirpath);
|
||||
dirpath = strdup("/usr/local/share/bim");
|
||||
sprintf(file, "%s/%s", dirpath, dirName);
|
||||
extra = "/";
|
||||
dirp = opendir(file);
|
||||
}
|
||||
if (!dirp) {
|
||||
fprintf(stderr, "Could not find startup files: %s\n", dirName);
|
||||
exit(1);
|
||||
|
Loading…
Reference in New Issue
Block a user