Fix confusing error in windows where it would complain about : in full pathnames...
authorCarl Hetherington <cth@carlh.net>
Tue, 15 Oct 2019 08:13:58 +0000 (10:13 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 15 Oct 2019 08:13:58 +0000 (10:13 +0200)
src/tools/dcpomatic.cc

index a9c93e9acb5bffa16a772bc0570f85e8ea3f171b..d207953ce5824101982e329e004ba37f8bd9eefb 100644 (file)
@@ -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) {