From 2b6c8e01804c67fdceaf30e56af249d98ce505e5 Mon Sep 17 00:00:00 2001 From: Vina Rodriguez Date: Tue, 19 Mar 2019 20:00:55 +0100 Subject: [PATCH] fix crash by using empty path to initialize folderbox with fs canonical() which don't exist --- source/gui/filebox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gui/filebox.cpp b/source/gui/filebox.cpp index 5b2db9e2..aff5b2a7 100644 --- a/source/gui/filebox.cpp +++ b/source/gui/filebox.cpp @@ -1359,7 +1359,7 @@ namespace nana path.resize(len); impl_->path = to_utf8(path); - } + } #endif } @@ -1589,7 +1589,7 @@ namespace nana }; folderbox::folderbox(window owner, const path_type& init_path, std::string title) - : impl_(new implement{ owner, fs::canonical(init_path).make_preferred(), title, false}) + : impl_(new implement{ owner, fs::weakly_canonical(init_path).make_preferred(), title, false}) {}