Skip to content

Commit

Permalink
fix read file (#2070)
Browse files Browse the repository at this point in the history
  • Loading branch information
zxkmm authored Mar 30, 2024
1 parent 2acefee commit 6d9d5ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions firmware/application/apps/ui_recon_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ ReconSetupViewMain::ReconSetupViewMain(NavigationView& nav, Rect parent_rect, st
auto open_view = nav.push<FileLoadView>(".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 {
Expand All @@ -72,7 +72,7 @@ ReconSetupViewMain::ReconSetupViewMain(NavigationView& nav, Rect parent_rect, st
auto open_view = nav.push<FileLoadView>(".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 {
Expand Down
2 changes: 1 addition & 1 deletion firmware/application/apps/ui_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ ScannerView::ScannerView(
auto open_view = nav.push<FileLoadView>(".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 {
Expand Down

0 comments on commit 6d9d5ad

Please sign in to comment.