mirror of
https://gittea.dev/nova/th.git
synced 2025-10-22 02:40: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 match = 0;
|
||||||
char *mime = get_mimetype(mid_content[selected_file_current].file_name);
|
char *mime = get_mimetype(mid_content[selected_file_current].file_name);
|
||||||
char *extension = strrchr(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 (extension != NULL) {
|
||||||
if (strstr(extension, file_extension_default_cmd[i].file_extension)) {
|
for (i = 0; i < file_extension_default_count; i++) {
|
||||||
char *cmd = concat(file_extension_default_cmd[i].command, " ./\"");
|
if (strstr(extension, file_extension_default_cmd[i].file_extension)) {
|
||||||
cmd = concat(cmd, mid_content[selected_file_current].file_name);
|
char *cmd = concat(file_extension_default_cmd[i].command, " ./\"");
|
||||||
cmd = concat(cmd, "\"");
|
cmd = concat(cmd, mid_content[selected_file_current].file_name);
|
||||||
|
cmd = concat(cmd, "\"");
|
||||||
|
|
||||||
|
|
||||||
if (system(cmd) == -1) {
|
if (system(cmd) == -1) {
|
||||||
/*do nothing*/
|
/*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) {
|
if (match == 0) {
|
||||||
|
Reference in New Issue
Block a user