diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-02-02 19:19:41 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-02-03 21:15:27 +0100 |
| commit | 983cb99da828856d867eb0dd984eadb5c5a7f48f (patch) | |
| tree | 4791728e5cf0663ef5dee433445307ac16efacd3 | |
| parent | 1b86d8b56cdb6f7289864fab708e40795494373d (diff) | |
Catch another exception from create_hard_link on Windows.v1.10.48
This is attempt to fix an uncaught "Fonction incorrecte" when using the
combiner.
| -rw-r--r-- | src/combine.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/combine.cc b/src/combine.cc index dfdf8b1b..e84b59a8 100644 --- a/src/combine.cc +++ b/src/combine.cc @@ -49,6 +49,7 @@ #include "raw_convert.h" #include <fmt/format.h> #include <boost/filesystem.hpp> +#include <boost/system/windows_error.hpp> #include <set> #include <string> #include <vector> @@ -89,7 +90,13 @@ create_hard_link_or_copy(boost::filesystem::path from, boost::filesystem::path t try { dcp::filesystem::create_hard_link(from, to); } catch (boost::filesystem::filesystem_error& e) { - if (e.code() == boost::system::errc::cross_device_link || e.code() == boost::system::errc::operation_not_supported) { + if ( + e.code() == boost::system::errc::cross_device_link || +#ifdef LIBDCP_WINDOWS + e.code() == boost::system::windows_error::invalid_function || +#endif + e.code() == boost::system::errc::operation_not_supported + ) { dcp::filesystem::copy_file(from, to); } else { throw; |
