Skip to content

Commit

Permalink
出力フォルダを選択するときにエラー落ちすることがあるバグを修正 #82
Browse files Browse the repository at this point in the history
  • Loading branch information
lltcggie committed Apr 16, 2017
1 parent 2b965ce commit f81a5b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion waifu2x-caffe-gui/MainDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ UINT_PTR DialogEvent::OFNHookProcOut(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARA
szPath[_countof(szPath) - 1] = TEXT('\0');

boost::filesystem::path p(szPath);
if (boost::filesystem::is_empty(szPath) || boost::filesystem::is_directory(szPath))
if (boost::filesystem::exists(p) && (boost::filesystem::is_empty(p) || boost::filesystem::is_directory(p)))
{
const auto filename = getTString(p.filename());

Expand Down

0 comments on commit f81a5b7

Please sign in to comment.