mirror of
https://gittea.dev/nova/th.git
synced 2025-10-21 10:20:15 -04:00
fixing move_right on extensionless files
This commit is contained in:
@@ -258,20 +258,22 @@ void move_right(){
|
||||
char match = 0;
|
||||
char *mime = get_mimetype(mid_content[selected_file_current].file_name);
|
||||
char *extension = strrchr(mid_content[selected_file_current].file_name, '.');
|
||||
for (i = 0; i < file_extension_default_count; i++) {
|
||||
if (strstr(extension, file_extension_default_cmd[i].file_extension)) {
|
||||
char *cmd = concat(file_extension_default_cmd[i].command, " ./\"");
|
||||
cmd = concat(cmd, mid_content[selected_file_current].file_name);
|
||||
cmd = concat(cmd, "\"");
|
||||
if (extension != NULL) {
|
||||
for (i = 0; i < file_extension_default_count; i++) {
|
||||
if (strstr(extension, file_extension_default_cmd[i].file_extension)) {
|
||||
char *cmd = concat(file_extension_default_cmd[i].command, " ./\"");
|
||||
cmd = concat(cmd, mid_content[selected_file_current].file_name);
|
||||
cmd = concat(cmd, "\"");
|
||||
|
||||
|
||||
if (system(cmd) == -1) {
|
||||
/*do nothing*/
|
||||
if (system(cmd) == -1) {
|
||||
/*do nothing*/
|
||||
}
|
||||
curs_set(1); /*for some reason, 1 here turns it invisible once again */
|
||||
match = 1;
|
||||
status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY | STATUS_UPDATE_SCREEN_RELOAD_FULL);
|
||||
break;
|
||||
}
|
||||
curs_set(1); /*for some reason, 1 here turns it invisible once again */
|
||||
match = 1;
|
||||
status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY | STATUS_UPDATE_SCREEN_RELOAD_FULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (match == 0) {
|
||||
|
Reference in New Issue
Block a user