Trivial simplification from Andrew V. Samoilov <sav@bcs.zp.ua>

This commit is contained in:
Pavel Roskin 2003-09-02 22:38:15 +00:00
parent ac1fd1d878
commit f0eeffd583

View File

@ -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) {