mod_storage_none: Add allways empty archive storage
authorKim Alvefur <zash@zash.se>
Tue, 04 Apr 2017 01:31:51 +0200
changeset 8062 6a725b242804
parent 8061 1b35a562528d
child 8063 71bdfdf6565d
child 8064 ef671d337577
mod_storage_none: Add allways empty archive storage
plugins/mod_storage_none.lua
--- a/plugins/mod_storage_none.lua	Tue Apr 04 01:30:00 2017 +0200
+++ b/plugins/mod_storage_none.lua	Tue Apr 04 01:31:51 2017 +0200
@@ -4,7 +4,7 @@
 local driver_mt = { __index = driver };
 
 function driver:open(store, typ)
-	if typ and typ ~= "keyval" then
+	if typ and typ ~= "keyval" and typ ~= "archive" then
 		return nil, "unsupported-store";
 	end
 	return setmetatable({ store = store, type = typ }, driver_mt);
@@ -25,4 +25,12 @@
 	return true;
 end
 
+function driver:append()
+	return nil, "Storage disabled";
+end
+
+function driver:find()
+	return function () end, 0;
+end
+
 module:provides("storage", driver);