From 6d9d5ad1af46099b1068e03b62ae50dcdf7013dc Mon Sep 17 00:00:00 2001 From: sommermorgentraum <24917424+zxkmm@users.noreply.github.com> Date: Sat, 30 Mar 2024 20:03:27 +0800 Subject: [PATCH] fix read file (#2070) --- firmware/application/apps/ui_recon_settings.cpp | 4 ++-- firmware/application/apps/ui_scanner.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/application/apps/ui_recon_settings.cpp b/firmware/application/apps/ui_recon_settings.cpp index b5e7be34..3cfd5e42 100644 --- a/firmware/application/apps/ui_recon_settings.cpp +++ b/firmware/application/apps/ui_recon_settings.cpp @@ -59,7 +59,7 @@ ReconSetupViewMain::ReconSetupViewMain(NavigationView& nav, Rect parent_rect, st auto open_view = nav.push(".TXT"); open_view->push_dir(freqman_dir); open_view->on_changed = [this, &nav](std::filesystem::path new_file_path) { - if (new_file_path.native().find(freqman_dir.native()) == 0) { + if (new_file_path.native().find((u"/" / freqman_dir).native()) == 0) { _input_file = new_file_path.stem().string(); text_input_file.set(_input_file); } else { @@ -72,7 +72,7 @@ ReconSetupViewMain::ReconSetupViewMain(NavigationView& nav, Rect parent_rect, st auto open_view = nav.push(".TXT"); open_view->push_dir(freqman_dir); open_view->on_changed = [this, &nav](std::filesystem::path new_file_path) { - if (new_file_path.native().find(freqman_dir.native()) == 0) { + if (new_file_path.native().find((u"/" / freqman_dir).native()) == 0) { _output_file = new_file_path.stem().string(); button_choose_output_name.set_text(_output_file); } else { diff --git a/firmware/application/apps/ui_scanner.cpp b/firmware/application/apps/ui_scanner.cpp index e6a3c819..8f7d4495 100644 --- a/firmware/application/apps/ui_scanner.cpp +++ b/firmware/application/apps/ui_scanner.cpp @@ -338,7 +338,7 @@ ScannerView::ScannerView( auto open_view = nav.push(".TXT"); open_view->push_dir(freqman_dir); open_view->on_changed = [this, &nav](std::filesystem::path new_file_path) { - if (new_file_path.native().find(freqman_dir.native()) == 0) { + if (new_file_path.native().find((u"/" / freqman_dir).native()) == 0) { scan_pause(); frequency_file_load(new_file_path); } else {