Commit f1f280da71b23f2b820bd002726914e656951523
Fix argument escaping issues for fg progs on Win
This and some more issues might have arisen because of the use of
system() which resulted in using shell to run shell in an
environment (Windows) where escaping is not well-defined...
Thanks to fohrums.
Fixes #790 on GitHub.
Author: xaizek
Author date (UTC): 2022-06-25 15:54
Committer name: xaizek
Committer date (UTC): 2022-06-25 16:00
Parent(s): bf06feb92689a13f8df6d9be1c7edd3f16e5e69c
Signing key: 99DC5E4DB05F6BE2
Tree: d0a5490bcefae67f9e37b5981bbebd75ebe7eac7
File ChangeLog changed (mode: 100644) (index ed0ed64fa..ce39023b3) |
185 |
185 |
Fixed :restart creating trash directory in incorrect location on Windows |
Fixed :restart creating trash directory in incorrect location on Windows |
186 |
186 |
in some cases. |
in some cases. |
187 |
187 |
|
|
|
188 |
|
Fixed argument escaping issues for foreground programs on Windows. Thanks |
|
189 |
|
to fohrums. |
|
190 |
|
|
188 |
191 |
0.12-beta to 0.12 (2021-09-29) |
0.12-beta to 0.12 (2021-09-29) |
189 |
192 |
|
|
190 |
193 |
Made :VifmCs of the plugin handle 24-bit colors. |
Made :VifmCs of the plugin handle 24-bit colors. |
File THANKS changed (mode: 100644) (index 57018ad32..4529c8f0e) |
... |
... |
Flaviu Tamas (flaviut) |
83 |
83 |
Florian Baumann (derflob) |
Florian Baumann (derflob) |
84 |
84 |
flux242 |
flux242 |
85 |
85 |
fogine |
fogine |
|
86 |
|
fohrums |
86 |
87 |
gammaray |
gammaray |
87 |
88 |
gcmt |
gcmt |
88 |
89 |
Gene Zharov |
Gene Zharov |
File src/utils/utils_win.c changed (mode: 100644) (index 97bb2beb5..2fc9e3fc1) |
... |
... |
pause_shell(void) |
97 |
97 |
int |
int |
98 |
98 |
run_in_shell_no_cls(char command[], ShellRequester by) |
run_in_shell_no_cls(char command[], ShellRequester by) |
99 |
99 |
{ |
{ |
100 |
|
int ret; |
|
101 |
100 |
char *const sh_cmd = win_make_sh_cmd(command, by); |
char *const sh_cmd = win_make_sh_cmd(command, by); |
102 |
101 |
|
|
103 |
|
/* XXX: why do we use different functions for different cases? */ |
|
104 |
|
if(curr_stats.shell_type == ST_CMD || curr_stats.shell_type == ST_PS) |
|
|
102 |
|
int returned_exit_code; |
|
103 |
|
int ret = win_exec_cmd(sh_cmd, &returned_exit_code); |
|
104 |
|
if(!returned_exit_code) |
105 |
105 |
{ |
{ |
106 |
|
ret = os_system(sh_cmd); |
|
107 |
|
} |
|
108 |
|
else |
|
109 |
|
{ |
|
110 |
|
int returned_exit_code; |
|
111 |
|
ret = win_exec_cmd(sh_cmd, &returned_exit_code); |
|
112 |
|
if (!returned_exit_code) |
|
113 |
|
{ |
|
114 |
|
ret = -1; |
|
115 |
|
} |
|
|
106 |
|
ret = -1; |
116 |
107 |
} |
} |
117 |
108 |
|
|
118 |
109 |
free(sh_cmd); |
free(sh_cmd); |