Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files.c')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 09192c5c2ec..d92e61be76a 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -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,