Ticket #4242: mc-view-on-no-exec-fs.patch

File mc-view-on-no-exec-fs.patch, 584 bytes (added by lkrotowski, 12 months ago)
  • mc-4.8.26/src/usermenu.c

    old new  
    546546 
    547547    if (run_view) 
    548548    { 
    549         mcview_viewer (vfs_path_as_str (file_name_vpath), NULL, 0, 0, 0); 
     549        /* execute the command indirectly to allow execution even 
     550         * on no-exec filesystems. */ 
     551        char *cmd; 
     552 
     553        cmd = g_strconcat ("/bin/sh ", vfs_path_as_str (file_name_vpath), (char *) NULL); 
     554 
     555        mcview_viewer (cmd, NULL, 0, 0, 0); 
    550556        dialog_switch_process_pending (); 
    551557    } 
    552558    else