Windows fixes

This commit is contained in:
luboslenco
2024-09-22 17:48:17 +02:00
parent eb3fb6e268
commit 7554eeef53
3 changed files with 9 additions and 4 deletions
+3 -4
View File
@@ -195,13 +195,12 @@ function box_projects_recent_tab(ui: ui_t) {
for (let i: i32 = 0; i < config_raw.recent_projects.length; ++i) {
let path: string = config_raw.recent_projects[i];
let file: string = path;
///if arm_windows
file = string_replace_all(path, "/", "\\");
path = string_replace_all(path, "/", "\\");
///else
file = string_replace_all(path, "\\", "/");
path = string_replace_all(path, "\\", "/");
///end
file = substring(file, string_last_index_of(file, path_sep) + 1, file.length);
let file: string = substring(path, string_last_index_of(path, path_sep) + 1, path.length);
if (string_index_of(to_lower_case(file), to_lower_case(box_projects_hsearch.text)) < 0) {
continue; // Search filter
+3
View File
@@ -216,6 +216,9 @@ function export_arm_run_project() {
///else
let recent_path: string = project_filepath;
///end
///if arm_windows
recent_path = string_replace_all(recent_path, "\\", "/");
///end
let recent: string[] = config_raw.recent_projects;
array_remove(recent, recent_path);
array_insert(recent, 0, recent_path);
+3
View File
@@ -59,6 +59,9 @@ function import_arm_run_project(path: string) {
///else
let recent_path: string = path;
///end
///if arm_windows
recent_path = string_replace_all(recent_path, "\\", "/");
///end
let recent: string[] = config_raw.recent_projects;
array_remove(recent, recent_path);
array_insert(recent, 0, recent_path);