geotag: add GCC7 support

Signed-off-by: Rosen Penev <rosenp@gmail.com>
main
Rosen Penev 2 years ago
parent 357d970425
commit 0c0dabfcc7

@ -8,9 +8,16 @@
#include <sys/types.h> #include <sys/types.h>
#include <algorithm> #include <algorithm>
#include <filesystem>
#include <iostream> #include <iostream>
#if __has_include(<filesystem>)
#include <filesystem>
namespace fs = std::filesystem;
#else
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#endif
using namespace std; using namespace std;
#ifdef _WIN32 #ifdef _WIN32
@ -795,7 +802,7 @@ int main(int argc, const char* argv[]) {
printf("%s %s ", arg, types[type]); printf("%s %s ", arg, types[type]);
if (type == typeImage) { if (type == typeImage) {
time_t t = readImageTime(std::string(arg)); time_t t = readImageTime(std::string(arg));
auto p = std::filesystem::absolute(std::filesystem::path(arg)); auto p = fs::absolute(fs::path(arg));
std::string path = p.string(); std::string path = p.string();
if (t && !path.empty()) { if (t && !path.empty()) {
if (options.verbose) if (options.verbose)

Loading…
Cancel
Save