util.datamanager: Handle gracefully the lack of prosody.paths.data
authorMatthew Wild <mwild1@gmail.com>
Tue, 11 Jan 2011 04:19:03 +0000 (04:19 +0000)
committerMatthew Wild <mwild1@gmail.com>
Tue, 11 Jan 2011 04:19:03 +0000 (04:19 +0000)
util/datamanager.lua

index 5aee289d66cc47b572c99e60c909a2eaf2d3fcad..2be3acfd2d50c84fa78d282d4b5b3d755f40dd3b 100644 (file)
@@ -57,7 +57,7 @@ local function mkdir(path)
        return path;
 end
 
-local data_path = prosody.paths.data;
+local data_path = (prosody and prosody.paths and prosody.paths.data) or ".";
 local callbacks = {};
 
 ------- API -------------