Revision: 15211
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15211
Author:   campbellbarton
Date:     2008-06-12 18:29:00 +0200 (Thu, 12 Jun 2008)

Log Message:
-----------
When your home directory is full, saving defaults would fail without raising an 
error.
checked all others instances of BLO_write_file give errors too.
When autosave fails it reports an error in the console so its not too annoying.

Modified Paths:
--------------
    trunk/blender/source/blender/src/usiblender.c

Modified: trunk/blender/source/blender/src/usiblender.c
===================================================================
--- trunk/blender/source/blender/src/usiblender.c       2008-06-12 15:43:55 UTC 
(rev 15210)
+++ trunk/blender/source/blender/src/usiblender.c       2008-06-12 16:29:00 UTC 
(rev 15211)
@@ -925,7 +925,7 @@
 
                writeBlog();
        } else {
-               error("%s", err);
+               error("failed to write blend file: %s", err);
        }
 
        waitcursor(0);
@@ -940,7 +940,10 @@
                
        /*  force save as regular blend file */
        write_flags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_LOCK | 
G_FILE_SIGN);
-       BLO_write_file(tstr, write_flags, &err);
+       
+       if (!BLO_write_file(tstr, write_flags, &err)) {
+               error("failed writing defaults: %s", err);
+       }
 }
 
 void BIF_write_autosave(void)
@@ -952,7 +955,9 @@
 
                /*  force save as regular blend file */
        write_flags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_LOCK | 
G_FILE_SIGN);
-       BLO_write_file(tstr, write_flags, &err);
+       if (!BLO_write_file(tstr, write_flags, &err)) {
+               fprintf(stderr, "failed to write autosave: %s\n", err); /* 
using error(...) is too annoying here */
+       }
 }
 
 /* remove temp files assosiated with this blend file when quitting, loading or 
saving in a new path */


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to