Comparison

core/moduleapi.lua @ 5498:2a67235e1d4d

moduleapi: Make module:open_store() open a store named after the calling module by default
author Kim Alvefur <zash@zash.se>
date Fri, 19 Apr 2013 14:42:32 +0200
parent 5496:7a0b81b5ca71
child 5526:d54011a23b20
comparison
equal deleted inserted replaced
5496:7a0b81b5ca71 5498:2a67235e1d4d
336 path = config.resolve_relative_path(self:get_directory(), path); 336 path = config.resolve_relative_path(self:get_directory(), path);
337 return io.open(path, mode); 337 return io.open(path, mode);
338 end 338 end
339 339
340 function api:open_store(name, type) 340 function api:open_store(name, type)
341 return storagemanager.open(self.host, name, type); 341 return storagemanager.open(self.host, name or self.name, type);
342 end 342 end
343 343
344 return api; 344 return api;