Use unique_ptr.
[dcpomatic.git] / src / lib / cross_windows.cc
index d97550ca9730aae138516619dc2d9173ff31acf3..ac92aa7eb730b8364673b8b8725b862453b7975f 100644 (file)
@@ -252,7 +252,12 @@ boost::filesystem::path
 fix_long_path (boost::filesystem::path long_path)
 {
        using namespace boost::filesystem;
+
        path fixed = "\\\\?\\";
+       if (boost::algorithm::starts_with(long_path.string(), fixed.string())) {
+               return long_path;
+       }
+
        /* We have to make the path canonical but we can't call canonical() on the long path
         * as it will fail.  So we'll sort of do it ourselves (possibly badly).
         */