From e97e716e21fe1a2810764ac4626910f5f8848388 Mon Sep 17 00:00:00 2001
From: Even Rouault <[EMAIL REDACTED]>
Date: Sat, 10 Jun 2023 22:35:51 +0200
Subject: [PATCH] TIFFOpenWExt(): mode r+ in the Windows implementation
adjusted to that of Linux
---
libtiff/tif_win32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libtiff/tif_win32.c b/libtiff/tif_win32.c
index 61ff724a..1a6b86df 100644
--- a/libtiff/tif_win32.c
+++ b/libtiff/tif_win32.c
@@ -332,7 +332,7 @@ TIFF *TIFFOpenWExt(const wchar_t *name, const char *mode, TIFFOpenOptions *opts)
dwMode = OPEN_EXISTING;
break;
case O_RDWR:
- dwMode = OPEN_ALWAYS;
+ dwMode = OPEN_EXISTING;
break;
case O_RDWR | O_CREAT:
dwMode = OPEN_ALWAYS;