diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-06-12 20:29:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-06-12 20:29:00 +0400 |
commit | 1e7f1f753f239f071e195d49a6c05963b09f9b42 (patch) | |
tree | 160f8bfaf5fb85b8089076d2e25f1c7c2226b6af /source/blender/src | |
parent | 7ffd70f39aec2388e3240b6981a20a4b9b23c271 (diff) |
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.
Diffstat (limited to 'source/blender/src')
-rw-r--r-- | source/blender/src/usiblender.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c index 6c0838288b8..5ac8e186b68 100644 --- a/source/blender/src/usiblender.c +++ b/source/blender/src/usiblender.c @@ -925,7 +925,7 @@ void BIF_write_file(char *target) writeBlog(); } else { - error("%s", err); + error("failed to write blend file: %s", err); } waitcursor(0); @@ -940,7 +940,10 @@ void BIF_write_homefile(void) /* 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 @@ void BIF_write_autosave(void) /* 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 */ |