From b6f681b802642ba38625a4d574c0a9e4f630fa3d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 15 Oct 2019 10:13:58 +0200 Subject: Fix confusing error in windows where it would complain about : in full pathnames if creating a directory failed. --- src/tools/dcpomatic.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 3ba9ceb9d..c35f7f09e 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -505,7 +505,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) { -- cgit v1.2.3