Skip to content

Commit

Permalink
Windows fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Sep 22, 2024
1 parent eb3fb6e commit 7554eee
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 3 additions & 4 deletions base/sources/box_projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions base/sources/export_arm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions base/sources/import_arm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7554eee

Please sign in to comment.