summaryrefslogtreecommitdiff
path: root/draw.c
diff options
context:
space:
mode:
authorlouie <lshprung@yahoo.com>2020-09-15 10:01:33 -0700
committerlouie <lshprung@yahoo.com>2020-09-15 10:01:33 -0700
commitbcb57cf92b1fd24374c23b0c8af3327216f0a936 (patch)
treebc10a0298810a798933c89353829aebce9c13f40 /draw.c
parent47659f11b50cce9eea576f791273e814fdf6fc8d (diff)
Removed compMode option, improved error messages
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/draw.c b/draw.c
index 85455f5..5a1fc9a 100644
--- a/draw.c
+++ b/draw.c
@@ -458,7 +458,6 @@ char *get_launch(){
char *flags = get_gflags(g[g_hover]);
char *path = get_epath(e[e_hover]);
bool force = get_eforce(e[e_hover]);
- int mode = get_compmode();
char *full_command = malloc(sizeof(char) * BUF_LEN);
full_command[0] = '\0';
@@ -471,8 +470,6 @@ char *get_launch(){
}
else{
- //if the entry is not forced and compatability mode is on, run it through the converter function
- if(mode != 0 && !force) path = compat_convert(path, mode);
strcat(full_command, "\"");
strcat(full_command, program);
strcat(full_command, "\"");
@@ -490,34 +487,6 @@ char *get_launch(){
}
-char *compat_convert(char *path, int mode){
- char *new = malloc(sizeof(char) * BUF_LEN);
- char *trav = new;
-
- //1 -> WSL: letter is in /mnt/, convert slashes to backslashes
- if(mode == 1){
- path = path+5;
- *trav = *path - 32; //point at letter, make it uppercase
- trav++;
- *trav = ':';
- path++;
- trav++;
-
- //convert each character
- while(*path != '\0'){
- if(*path == '/') *trav = '\\';
- else *trav = *path;
- path++;
- trav++;
- }
- *trav = '\0';
- }
-
- else printf("Error: mode should not be %d\n", mode);
-
- return new;
-}
-
#if defined _WIN32 || defined _WIN64
void win_launch(){
char *program = get_gprog(g[g_hover]);