From 01745d359eda2f81f25aa23d76000af9e58f761b Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Thu, 19 Dec 2013 09:54:02 +0100 Subject: Fix for T37864, save/save_as blend now refuses to save and report an error, when filepath is not writeable. --- source/blender/windowmanager/intern/wm_files.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/windowmanager/intern/wm_files.c') 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, -- cgit v1.2.3