[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20241] branches/blender2.5/blender/source /blender/blenlib/intern/fileops.c: Don' t create or truncate file when checking for writeable.

Martin Poirier theeth at yahoo.com
Sun May 17 18:10:39 CEST 2009


Revision: 20241
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20241
Author:   theeth
Date:     2009-05-17 18:10:39 +0200 (Sun, 17 May 2009)

Log Message:
-----------
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.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/blenlib/intern/fileops.c

Modified: branches/blender2.5/blender/source/blender/blenlib/intern/fileops.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenlib/intern/fileops.c	2009-05-17 15:09:03 UTC (rev 20240)
+++ branches/blender2.5/blender/source/blender/blenlib/intern/fileops.c	2009-05-17 16:10:39 UTC (rev 20241)
@@ -153,7 +153,7 @@
 {
 	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;





More information about the Bf-blender-cvs mailing list