summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--draw.c13
-rw-r--r--read_cfg.c4
-rw-r--r--read_cfg.obin9032 -> 9024 bytes
3 files changed, 14 insertions, 3 deletions
diff --git a/draw.c b/draw.c
index f3ee0b2..2e24a03 100644
--- a/draw.c
+++ b/draw.c
@@ -361,16 +361,25 @@ char *get_launch(){
char *path = get_epath(e[e_hover]);
int mode = get_compmode();
char *full_command = malloc(sizeof(char) * BUF_LEN);
+ bool quote_flag_p = (program[0] == '"' ? false : true);
bool quote_flag_f = (flags[0] == '"' ? false : true);
bool quote_flag_e = (path[0] == '"' ? false : true);
+ full_command[0] = '\0';
+
//if the entry is an executable file (doesn't have a launcher)
- if(!(strcmp(program, "./"))) return path;
+ if(!(strcmp(program, "./"))){
+ if(quote_flag_e) strcat(full_command, "\"");
+ strcat(full_command, path);
+ if(quote_flag_e) strcat(full_command, "\"");
+ return full_command;
+ }
else{
if(mode != 0) path = compat_convert(path, mode);
- full_command[0] = '\0';
+ if(quote_flag_p) strcat(full_command, "\"");
strcat(full_command, program);
+ if(quote_flag_p) strcat(full_command, "\"");
if(flags[0] !='\0'){
strcat(full_command, " ");
if(quote_flag_f) strcat(full_command, "\"");
diff --git a/read_cfg.c b/read_cfg.c
index 23d7af6..b8d90fb 100644
--- a/read_cfg.c
+++ b/read_cfg.c
@@ -215,7 +215,6 @@ void handle_fname(char *path, char *group){
//check if autoAlias is on. If it is, go to the autoAlias function
if(hr){
- printf("DEBUG: path = %s\n", relative_path_cpy);
strcpy(auto_name, autoAlias(relative_path_cpy));
new = create_entry(auto_name, relative_path_cpy);
}
@@ -230,6 +229,9 @@ void handle_fname(char *path, char *group){
//directory is not real, report error to the user
else printf("Error: \"%s\" bad path\n", dirname);
}
+
+ //path is not real, report error to the user
+ else printf("Error: \"%s\" bad path\n", dirname);
}
//file name is okay
diff --git a/read_cfg.o b/read_cfg.o
index c9e2dfc..6246fc5 100644
--- a/read_cfg.o
+++ b/read_cfg.o
Binary files differ