fix crash by using empty path to initialize folderbox with fs canonical() which don't exist

This commit is contained in:
Vina Rodriguez 2019-03-19 20:00:55 +01:00
parent b0392bfa3c
commit 2b6c8e0180

View File

@ -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})
{}