moduleapi: Make module:open_store() open a store named after the calling module by...
authorKim Alvefur <zash@zash.se>
Fri, 19 Apr 2013 12:42:32 +0000 (14:42 +0200)
committerKim Alvefur <zash@zash.se>
Fri, 19 Apr 2013 12:42:32 +0000 (14:42 +0200)
core/moduleapi.lua

index a8e6881e7bf89f91611d9097effd3f7d0e34f4bc..30360f73547354afc245f2f2065ed35573f2ad02 100644 (file)
@@ -338,7 +338,7 @@ function api:load_resource(path, mode)
 end
 
 function api:open_store(name, type)
-       return storagemanager.open(self.host, name, type);
+       return storagemanager.open(self.host, name or self.name, type);
 end
 
 return api;