diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-02-04 23:39:24 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-02-04 23:39:24 +0100 |
| commit | 64308c9e520dbd8e72b675d0ba064ecdaf9bd494 (patch) | |
| tree | ff8dc176d62340df9565e424f19b9d6349c4e8b8 /app | |
| parent | 79553ab1fa3d707612e80dd03bf95ca65fa0c411 (diff) | |
add error handling to ui
Diffstat (limited to 'app')
| -rw-r--r-- | app/mac/impl/file-browser-posix.cc | 10 |
1 files changed, 10 insertions, 0 deletions
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 <errno.h> #include <unistd.h> #include <fcntl.h> +#include <stdlib.h> 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()); } |
