Supporters update.
[dcpomatic.git] / test / zipper_test.cc
index c3f6ef7281140769220ab20489d190a44869942c..37e6176f0d322882df7694a9628f4b10c20d302a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2020-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 /** @file  test/zipper_test.cc
  *  @brief Test Zipper class.
  *  @ingroup selfcontained
  */
 
-#include "lib/zipper.h"
+
 #include "lib/exceptions.h"
+#include "lib/zipper.h"
 #include "test.h"
+#include <dcp/filesystem.h>
 #include <dcp/util.h>
 #include <boost/test/unit_test.hpp>
 #include <boost/filesystem.hpp>
 
+
 /** Basic test of Zipper working normally */
 BOOST_AUTO_TEST_CASE (zipper_test1)
 {
@@ -41,6 +45,11 @@ BOOST_AUTO_TEST_CASE (zipper_test1)
        zipper.add ("bar.txt", "xxxxxxCCCCbbbbbbb1");
        zipper.close ();
 
+       /* Make sure we aren't in a UNC current working directory otherwise the use of cmd.exe
+        * in system() below will fail.
+        */
+       boost::filesystem::current_path(dcp::filesystem::unfix_long_path(boost::filesystem::current_path()));
+
        boost::filesystem::remove_all ("build/test/zipper_test1", ec);
 #ifdef DCPOMATIC_WINDOWS
        /* unzip on windows crashes every so often (with a return code -1073740940, for some reason)