X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Futil.cc;fp=src%2Flib%2Futil.cc;h=1a340cbcee16358402c1ea24d334e87e83965d84;hp=1ce288686faec17ca20cf47a55a0b6fd2396bfc6;hb=96f50dd5e600925488fdd9db1580aa01b026269b;hpb=94a9473993b027b9368077009decbdd4322f90e3 diff --git a/src/lib/util.cc b/src/lib/util.cc index 1ce288686..1a340cbce 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -448,7 +449,7 @@ LIBDCP_ENABLE_WARNINGS #ifdef DCPOMATIC_WINDOWS putenv ("PANGOCAIRO_BACKEND=fontconfig"); - if (boost::filesystem::exists(resources_path() / "fonts.conf")) { + if (dcp::filesystem::exists(resources_path() / "fonts.conf")) { /* The actual application after installation */ putenv(String::compose("FONTCONFIG_PATH=%1", resources_path().string()).c_str()); } else { @@ -562,7 +563,7 @@ digest_head_tail (vector files, boost::uintmax_t size) throw OpenFileError (files[i].string(), errno, OpenFileError::READ); } - boost::uintmax_t this_time = min (to_do, boost::filesystem::file_size (files[i])); + auto this_time = min(to_do, dcp::filesystem::file_size(files[i])); f.checked_read(p, this_time); p += this_time; to_do -= this_time; @@ -581,7 +582,7 @@ digest_head_tail (vector files, boost::uintmax_t size) throw OpenFileError (files[i].string(), errno, OpenFileError::READ); } - boost::uintmax_t this_time = min (to_do, boost::filesystem::file_size (files[i])); + auto this_time = min(to_do, dcp::filesystem::file_size(files[i])); f.seek(-this_time, SEEK_END); f.checked_read(p, this_time); p += this_time; @@ -598,7 +599,7 @@ digest_head_tail (vector files, boost::uintmax_t size) string simple_digest (vector paths) { - return digest_head_tail(paths, 1000000) + raw_convert(boost::filesystem::file_size(paths.front())); + return digest_head_tail(paths, 1000000) + raw_convert(dcp::filesystem::file_size(paths.front())); } @@ -965,7 +966,7 @@ copy_in_bits (boost::filesystem::path from, boost::filesystem::path to, std::fun std::vector buffer(chunk); - boost::uintmax_t const total = boost::filesystem::file_size (from); + auto const total = dcp::filesystem::file_size(from); boost::uintmax_t remaining = total; while (remaining) { @@ -1037,7 +1038,7 @@ default_font_file () boost::filesystem::path liberation_normal; try { liberation_normal = resources_path() / "LiberationSans-Regular.ttf"; - if (!boost::filesystem::exists (liberation_normal)) { + if (!dcp::filesystem::exists(liberation_normal)) { /* Hack for unit tests */ liberation_normal = resources_path() / "fonts" / "LiberationSans-Regular.ttf"; } @@ -1045,10 +1046,10 @@ default_font_file () } - if (!boost::filesystem::exists(liberation_normal)) { + if (!dcp::filesystem::exists(liberation_normal)) { liberation_normal = "/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf"; } - if (!boost::filesystem::exists(liberation_normal)) { + if (!dcp::filesystem::exists(liberation_normal)) { liberation_normal = "/usr/share/fonts/liberation-sans/LiberationSans-Regular.ttf"; } @@ -1084,7 +1085,7 @@ error_details(boost::system::error_code ec) bool contains_assetmap(boost::filesystem::path dir) { - return boost::filesystem::is_regular_file(dir / "ASSETMAP") || boost::filesystem::is_regular_file(dir / "ASSETMAP.xml"); + return dcp::filesystem::is_regular_file(dir / "ASSETMAP") || dcp::filesystem::is_regular_file(dir / "ASSETMAP.xml"); }