From ee9b432e3fe7b37e262b7f3e11ae18ae63bd83dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?okhowang=28=E7=8E=8B=E6=B2=9B=E6=96=87=29?= Date: Tue, 7 Apr 2020 19:09:54 +0800 Subject: [PATCH] Fixed MinGW no-exception logic --- include/ghc/filesystem.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/ghc/filesystem.hpp b/include/ghc/filesystem.hpp index 47f61fb..bd2b5a9 100644 --- a/include/ghc/filesystem.hpp +++ b/include/ghc/filesystem.hpp @@ -5079,6 +5079,7 @@ public: do { if (FindNextFileW(_dirHandle, &_findData)) { _current = _base; +#ifdef GHC_RAISE_UNICODE_ERRORS try { _current.append_name(detail::toUtf8(_findData.cFileName).c_str()); } @@ -5086,6 +5087,9 @@ public: ec = fe.code(); return; } +#else + _current.append_name(detail::toUtf8(_findData.cFileName).c_str()); +#endif copyToDirEntry(ec); } else {