summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/views/survex.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/views/survex.py b/core/views/survex.py
index 09bb434..9b6fc18 100644
--- a/core/views/survex.py
+++ b/core/views/survex.py
@@ -147,6 +147,8 @@ class SvxForm(forms.Form):
if not os.path.exists(newpath):
os.makedirs(newpath)
fout = open(fname, "wt", encoding='utf8',newline='\n')
+ except PermissionError:
+ return "CANNOT save this file.\nPERMISSIONS incorrectly set on server for this file. Ask a nerd to fix this."
# javascript seems to insert CRLF on WSL1 whatever you say. So fix that:
res = fout.write(rcode.replace("\r",""))