# HG changeset patch # User Kim Alvefur # Date 1424455201 -3600 # Node ID bdaadf70a48f865ef6a2f7c9d07290846cd99068 # Parent cd0088c73daf80a77be19f930f36a9341115dd11 util.datamanager: Check that the global 'prosody' exists before using it (fixes nil indexing in use outside of prosody) diff -r cd0088c73daf -r bdaadf70a48f util/datamanager.lua --- a/util/datamanager.lua Fri Feb 20 15:51:05 2015 +0000 +++ b/util/datamanager.lua Fri Feb 20 19:00:01 2015 +0100 @@ -163,7 +163,7 @@ return nil, msg; end -if prosody.platform ~= "posix" then +if prosody and prosody.platform ~= "posix" then -- os.rename does not overwrite existing files on Windows -- TODO We could use Transactional NTFS on Vista and above function atomic_store(filename, data)