From: Carl Hetherington Date: Tue, 15 Oct 2019 08:13:58 +0000 (+0200) Subject: Fix confusing error in windows where it would complain about : in full pathnames... X-Git-Tag: v2.15.24~6 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=aea3b88c63895121cbb632dfc84755a11cdeffba Fix confusing error in windows where it would complain about : in full pathnames if creating a directory failed. --- diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index a9c93e9ac..d207953ce 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -510,7 +510,7 @@ private: } catch (boost::filesystem::filesystem_error& e) { #ifdef DCPOMATIC_WINDOWS string bad_chars = "<>:\"/|?*"; - string const filename = d->path().string(); + string const filename = d->path().filename().string(); string found_bad_chars; for (size_t i = 0; i < bad_chars.length(); ++i) { if (filename.find(bad_chars[i]) != string::npos && found_bad_chars.find(bad_chars[i]) == string::npos) {