diff --git a/exif/patchs/basicio.cpp.patch b/exif/patchs/basicio.cpp.patch index f8dfdfc..f77a6d2 100644 --- a/exif/patchs/basicio.cpp.patch +++ b/exif/patchs/basicio.cpp.patch @@ -1,9 +1,9 @@ diff --git a/src/basicio.cpp b/src/basicio.cpp -index cd2880651..ab7447071 100644 +index 3971cb50c..b76f86e61 100644 --- a/src/basicio.cpp +++ b/src/basicio.cpp -@@ -62,6 +62,64 @@ void ReplaceStringInPlace(std::string& subject, std::string_view search, std::st - } // namespace +@@ -51,6 +51,64 @@ namespace fs = std::experimental::filesystem; + #endif namespace Exiv2 { +#if defined(__MINGW__) || (defined(WIN32) && !defined(__CYGWIN__)) @@ -67,7 +67,7 @@ index cd2880651..ab7447071 100644 void BasicIo::readOrThrow(byte* buf, size_t rcount, ErrorCode err) { const size_t nread = read(buf, rcount); Internal::enforce(nread == rcount, err); -@@ -168,7 +226,11 @@ int FileIo::Impl::switchMode(OpMode opMode) { +@@ -158,7 +216,11 @@ int FileIo::Impl::switchMode(OpMode opMode) { std::fclose(fp_); openMode_ = "r+b"; opMode_ = opSeek; @@ -79,7 +79,7 @@ index cd2880651..ab7447071 100644 if (!fp_) return 1; #ifdef _WIN32 -@@ -489,7 +551,11 @@ int FileIo::open(const std::string& mode) { +@@ -479,7 +541,11 @@ int FileIo::open(const std::string& mode) { close(); p_->openMode_ = mode; p_->opMode_ = Impl::opSeek; diff --git a/scripts/build_win_exiv2.bat b/scripts/build_win_exiv2.bat index 36678f8..489bcf3 100644 --- a/scripts/build_win_exiv2.bat +++ b/scripts/build_win_exiv2.bat @@ -8,9 +8,9 @@ IF NOT EXIST cbuild ( MD cbuild || EXIT /B 1 ) CD cbuild || EXIT /B 1 -git clone "https://github.com/Exiv2/exiv2" || EXIT /B %ERRORLEVEL% +git clone --depth 1 "https://github.com/Exiv2/exiv2" || EXIT /B %ERRORLEVEL% CD exiv2 || EXIT /B %ERRORLEVEL% -git apply -3 %PATCH_DIR%\basicio.cpp.patch || EXIT /B %ERRORLEVEL% +git apply %PATCH_DIR%\basicio.cpp.patch || EXIT /B %ERRORLEVEL% IF NOT EXIST build ( MD build || EXIT /B 1 )