From 351086dbb83fa42d393a8a4f64287c2b90e23d97 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sun, 17 May 2009 16:10:39 +0000 Subject: Don't create or truncate file when checking for writeable. That was a nasty bug, would truncate current image file on disk when opening menu to load a new one. --- source/blender/blenlib/intern/fileops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 676a7e32333..ffebd05f2f6 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -153,7 +153,7 @@ int BLI_is_writable(char *filename) { int file; - file = open(filename, O_BINARY | O_RDWR | O_CREAT | O_TRUNC, 0666); + file = open(filename, O_BINARY | O_RDWR, 0666); if (file < 0) return 0; -- cgit v1.2.3