[gegl] gegl/buffer: open swap files with O_BINARY on windows



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]