From 931c95d0b130e07a4f9e8fb2f41c99235607cc41 Mon Sep 17 00:00:00 2001 From: dteviot Date: Thu, 26 Feb 2015 06:17:29 +1300 Subject: [PATCH] workaround for not building on Linux version of Travis. --- apps/mwiniimporter/importer.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/mwiniimporter/importer.cpp b/apps/mwiniimporter/importer.cpp index b71ebd2b8e..00774d7982 100644 --- a/apps/mwiniimporter/importer.cpp +++ b/apps/mwiniimporter/importer.cpp @@ -883,16 +883,23 @@ void MwIniImporter::setInputEncoding(const ToUTF8::FromType &encoding) std::time_t MwIniImporter::lastWriteTime(const boost::filesystem::path& filename, std::time_t defaultTime) { std::time_t writeTime(defaultTime); - boost::filesystem::path resolved = boost::filesystem::canonical(filename); - if (boost::filesystem::exists(resolved)) + if (boost::filesystem::exists(filename)) { + // FixMe: remove #if when Boost on Travis Linux updated + // Travis seems to be using older version of boost for Linux + // This should allow things to build until fixed +#if BOOST_FILESYSTEM_VERSION == 3 + boost::filesystem::path resolved = boost::filesystem::canonical(filename); +#else + boost::filesystem::path resolved = filename; +#endif writeTime = boost::filesystem::last_write_time(resolved); std::cout << "content file: " << resolved << " timestamp = (" << writeTime << ") " << asctime(localtime(&writeTime)) << std::endl; } else { - std::cout << "content file: " << resolved << " not found" << std::endl; + std::cout << "content file: " << filename << " not found" << std::endl; } return writeTime; } \ No newline at end of file