aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/persist.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/luarocks/persist.lua b/src/luarocks/persist.lua
index 02c5016c..4dcd930a 100644
--- a/src/luarocks/persist.lua
+++ b/src/luarocks/persist.lua
@@ -188,6 +188,8 @@ end
188-- @return boolean or (nil, string): true if successful, or nil and a 188-- @return boolean or (nil, string): true if successful, or nil and a
189-- message in case of errors. 189-- message in case of errors.
190function persist.save_from_table(filename, tbl, field_order) 190function persist.save_from_table(filename, tbl, field_order)
191 local prefix = dir.dir_name(filename)
192 fs.make_dir(prefix)
191 local out = io.open(filename, "w") 193 local out = io.open(filename, "w")
192 if not out then 194 if not out then
193 return nil, "Cannot create file at "..filename 195 return nil, "Cannot create file at "..filename