Fix confusing error in windows where it would complain about : in full pathnames...
[dcpomatic.git] / src / tools / dcpomatic.cc
index 3ba9ceb9dfc5b6bf497b4473228eec2c0c61ac81..c35f7f09e354207318474e5e6c200d0175841ef0 100644 (file)
@@ -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) {