Fix for T37864, save/save_as blend now refuses to save and report an error, when filepath is not writeable.
This commit is contained in:
parent
dce82591a7
commit
01745d359e
|
@ -881,6 +881,12 @@ int wm_file_write(bContext *C, const char *filepath, int fileflags, ReportList *
|
|||
BKE_report(reports, RPT_ERROR, "Path too long, cannot save");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Check if file write permission is ok */
|
||||
if (!BLI_file_is_writable(filepath)) {
|
||||
BKE_reportf(reports, RPT_ERROR, "Cannot save blend file, path '%s' is not writable", filepath);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* note: used to replace the file extension (to ensure '.blend'),
|
||||
* no need to now because the operator ensures,
|
||||
|
|
Loading…
Reference in New Issue