mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-09 13:02:01 +03:00
Trivial simplification from Andrew V. Samoilov <sav@bcs.zp.ua>
This commit is contained in:
parent
ac1fd1d878
commit
f0eeffd583
@ -219,13 +219,10 @@ exec_extension (const char *filename, const char *data, int *move_dir,
|
||||
g_free (file_name);
|
||||
file_name = NULL;
|
||||
} else {
|
||||
int cmd_len = strlen (file_name) + 10;
|
||||
|
||||
/* Set executable flag on the command file ... */
|
||||
chmod (file_name, S_IRWXU);
|
||||
/* ... but don't rely on it - run /bin/sh explicitly */
|
||||
cmd = g_malloc (cmd_len);
|
||||
g_snprintf (cmd, cmd_len, "/bin/sh %s", file_name);
|
||||
cmd = g_strconcat ("/bin/sh ", file_name, NULL);
|
||||
}
|
||||
|
||||
if (run_view) {
|
||||
|
Loading…
Reference in New Issue
Block a user