[gegl] gegl/buffer: open swap files with O_BINARY on windows
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl/buffer: open swap files with O_BINARY on windows
- Date: Sun, 17 Nov 2019 16:05:46 +0000 (UTC)
commit 80d9d9218fb656997e65521b65818e6c0a56a379
Author: Øyvind Kolås <pippin gimp org>
Date: Sun Nov 17 17:04:45 2019 +0100
gegl/buffer: open swap files with O_BINARY on windows
Hopefully remedying issue gimp#4235.
gegl/buffer/gegl-tile-backend-swap.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/gegl/buffer/gegl-tile-backend-swap.c b/gegl/buffer/gegl-tile-backend-swap.c
index 8766e1327..3e737dcca 100644
--- a/gegl/buffer/gegl-tile-backend-swap.c
+++ b/gegl/buffer/gegl-tile-backend-swap.c
@@ -1431,8 +1431,13 @@ gegl_tile_backend_swap_ensure_exist (void)
GEGL_NOTE (GEGL_DEBUG_TILE_BACKEND, "creating swapfile %s", path);
+#ifdef G_OS_WIN32
+ out_fd = g_open (path, O_RDWR|O_CREAT|O_BINARY, 0770);
+ in_fd = g_open (path, O_RDONLY|O_BINARY, 0);
+#else
out_fd = g_open (path, O_RDWR|O_CREAT, 0770);
in_fd = g_open (path, O_RDONLY, 0);
+#endif
if (out_fd == -1 || in_fd == -1)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]