synched with trunk at revision 30243
[blender.git] / source / blender / blenloader / intern / writefile.c
index 9f66d90..3e2b65c 100644 (file)
@@ -2484,7 +2484,7 @@ int BLO_write_file(Main *mainvar, char *dir, int write_flags, ReportList *report
 
        file = open(tempname,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
        if(file == -1) {
-               BKE_report(reports, RPT_ERROR, "Unable to open file for writing.");
+               BKE_reportf(reports, RPT_ERROR, "Can't open file for writing: %s.", strerror(errno));
                return 0;
        }
 
@@ -2505,7 +2505,7 @@ int BLO_write_file(Main *mainvar, char *dir, int write_flags, ReportList *report
                        makeFilesAbsolute(G.sce, NULL);
        }
 
-       BLI_make_file_string(G.sce, userfilename, BLI_gethome(), ".B25.blend");
+       BLI_make_file_string(G.sce, userfilename, BLI_get_folder_create(BLENDER_USER_CONFIG, NULL), BLENDER_STARTUP_FILE);
        write_user_block= BLI_streq(dir, userfilename);
 
        if(write_flags & G_FILE_RELATIVE_REMAP)