From 71672da7ddb6b80f931b71ddc8163b21771d274e Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Wed, 2 Dec 2015 12:02:15 +0100 Subject: [PATCH] Windows: fix missing O_BINARY. Reinstate image tag indexing --- src/utils/copyfile.cpp | 5 +++-- src/windows/mimeconf | 10 +++++----- src/windows/recoll-setup.iss | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/utils/copyfile.cpp b/src/utils/copyfile.cpp index 4cf69733..12bcd44d 100644 --- a/src/utils/copyfile.cpp +++ b/src/utils/copyfile.cpp @@ -26,6 +26,7 @@ #ifndef _WIN32 #include #include +#define O_BINARY 0 #endif #include @@ -43,7 +44,7 @@ bool copyfile(const char *src, const char *dst, string &reason, int flags) int dfd = -1; bool ret = false; char buf[CPBSIZ]; - int oflags = O_WRONLY|O_CREAT|O_TRUNC; + int oflags = O_WRONLY|O_CREAT|O_TRUNC|O_BINARY; LOGDEB(("copyfile: %s to %s\n", src, dst)); @@ -96,7 +97,7 @@ bool stringtofile(const string& dt, const char *dst, string& reason, LOGDEB(("stringtofile:\n")); int dfd = -1; bool ret = false; - int oflags = O_WRONLY|O_CREAT|O_TRUNC; + int oflags = O_WRONLY|O_CREAT|O_TRUNC|O_BINARY; LOGDEB(("stringtofile: %u bytes to %s\n", (unsigned int)dt.size(), dst)); diff --git a/src/windows/mimeconf b/src/windows/mimeconf index 509501ce..0524f88f 100644 --- a/src/windows/mimeconf +++ b/src/windows/mimeconf @@ -123,11 +123,11 @@ audio/mpeg = execm python rclaudio audio/mp4 = execm python rclaudio audio/aac = execm python rclaudio audio/x-karaoke = execm python rclkar -#image/gif = execm python rclimg.py -#image/jp2 = execm python rclimg.py -#image/jpeg = execm python rclimg.py -#image/png = execm python rclimg.py -#image/tiff = execm python rclimg.py +image/gif = execm python rclimg.py +image/jp2 = execm python rclimg.py +image/jpeg = execm python rclimg.py +image/png = execm python rclimg.py +image/tiff = execm python rclimg.py image/svg+xml = execm python rclsvg.py #image/x-xcf = execm perl rclimg inode/symlink = internal diff --git a/src/windows/recoll-setup.iss b/src/windows/recoll-setup.iss index 3e77ebea..f57b2932 100644 --- a/src/windows/recoll-setup.iss +++ b/src/windows/recoll-setup.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "Recoll" -#define MyAppVersion "1.22.0-20151115" +#define MyAppVersion "1.22.0-20151202" #define MyAppPublisher "Recoll.org" #define MyAppURL "http://www.recoll.org" #define MyAppExeName "recoll.exe"