summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/modelfunctions.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/modelfunctions.lua b/lib/modelfunctions.lua
index e0d2885..076d1bb 100644
--- a/lib/modelfunctions.lua
+++ b/lib/modelfunctions.lua
@@ -196,6 +196,7 @@ function write_file_with_audit (self, path, str)
pre(self, path, tmpfile)
end
+ if fs.dirname(path) and not posix.stat(fs.dirname(path)) then fs.create_directory(fs.dirname(path)) end
os.rename (tmpfile, path)
if (type(post) == "string" and #post) then