diff --git a/core/views/survex.py b/core/views/survex.py index e9593ae..2a38ad7 100644 --- a/core/views/survex.py +++ b/core/views/survex.py @@ -239,6 +239,9 @@ class SvxForm(forms.Form): # this is a new survex file being created from the template if not fname.parent.is_dir(): fname.parent.mkdir(parents=True, exist_ok=True) + if " " in self.data["filename"]: + errmsg = "Error: Spaces are not possible in filenames.\n\nRename the file." + return errmsg if re.search(r"\[|\]", rcode): errmsg = "Error: remove all []s from the text.\nEverything inside [] are only template guidance.\n\n" errmsg += "All [] must be edited out and replaced with real data before you can save this file.\n"