From 64308c9e520dbd8e72b675d0ba064ecdaf9bd494 Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Tue, 4 Feb 2025 23:39:24 +0100 Subject: add error handling to ui --- app/mac/impl/file-browser-posix.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/mac') diff --git a/app/mac/impl/file-browser-posix.cc b/app/mac/impl/file-browser-posix.cc index 4c717fd..8cde6b7 100644 --- a/app/mac/impl/file-browser-posix.cc +++ b/app/mac/impl/file-browser-posix.cc @@ -3,11 +3,21 @@ #include #include #include +#include namespace nes::app::mac { file_browser_posix::file_browser_posix() { + auto const initial_path = getenv("HOME"); + if (initial_path) + { + for (auto const component : path_view{ initial_path }) + { + if (path_.push(component) != status::success) { break; } + } + } + reopen_directory(path_.get_path()); } -- cgit v1.3.1