Commit Graph

88 Commits (cedbb60261a7debbc7e2ebc2fbfcc88025ca58b7)

Author SHA1 Message Date
Kim Alvefur f828dae360 util.datamanager: Explicit handling of each error condition (see #632) 10 years ago
Kim Alvefur 1370ab3c3a util.datamanager: Unreference file handle after closing it to prevent trying to close it again (fixes #632) 10 years ago
Kim Alvefur 46fa454933 util.datamanager: Add append to public api 11 years ago
Kim Alvefur 6a9821a8c7 util.datamanager: Return extra location info 11 years ago
Kim Alvefur 2482f0614a util.datamanager: Make sure only strings are passed as data to append() 11 years ago
Kim Alvefur 25a50fa01a util.datamanager: Add some comments about the append function 11 years ago
Kim Alvefur 1099fb8dd7 util.datamanager: Handle potential error from :write() call 11 years ago
Kim Alvefur 93304d3439 util.datamanager: Handle potential issues from fallocate 11 years ago
Kim Alvefur da98f64639 util.datamanager: No shadowing of variable [luacheck] 11 years ago
Kim Alvefur c54585b91c util.datamanager: Skip past second check if first attemtp to open file succeeds 11 years ago
Kim Alvefur 51302e343c util.datamanager: In append() collect status when closing file handle as it may fail (eg the implied flush) 11 years ago
Kim Alvefur 0672574657 util.datamanager: Overwrite 'data' variable instead of shadownig it [luacheck] 11 years ago
Kim Alvefur 429ea15d8b util.datamanager: Factor out code for appending bytes to a file 11 years ago
Kim Alvefur 3c56b42545 util.datamanager: Fix traceback from trying to purge when storage is empty or otherwise unaccessible (fixes #496) 11 years ago
Kim Alvefur 646f9e84bc util.datamanager: Fix traceback due to %s in log message 11 years ago
Kim Alvefur 1c33e777ec util.datamanager: Check that the global 'prosody' exists before using it (fixes nil indexing in use outside of prosody) 11 years ago
Kim Alvefur 3015aac8bc util.*: Remove use of module() function, make all module functions local and return them in a table at the end 11 years ago
Matthew Wild 5c21c86aab util.datamanager: Clear the cache of created directories on storage failure, and retry 13 years ago
Marco Cirillo 7e71294f67 util.datamanager: expose path decode and encode functions. 13 years ago
Kim Alvefur 82a91911a2 util.datamanager: Don't escape the name of a store 14 years ago
Kim Alvefur 94f0e1cb26 util.datamanager: Remove unused variable 14 years ago
Kim Alvefur 38daeec89e util.datamanager: Remove dead code path 14 years ago
Kim Alvefur f4717fe48c mod_storage_internal, datamanager: Add support for iterating over users with data in a store 14 years ago
Kim Alvefur f7f8f20929 storagemanager, datamanager, mod_storage_{internal,sql}: Replace list_stores() with an iterator version 14 years ago
Waqas Hussain a79c507ade util.datamanager: Make the util.pposix dependency optional. 14 years ago
Kim Alvefur 4cb8031b57 util.datamanager: Ignore errors if the file is gone after removing it 14 years ago
Kim Alvefur ccb65a8971 util.datamanager: Collect errors when deleting all stores of a user, but ignore "no such file" 14 years ago
Kim Alvefur b20cc7f5d7 util.datamanager: Try to open in read+write mode, then retry with write mode if that fails (usually because it doesn't exist) 14 years ago
Waqas Hussain 5e947f4b08 util.datamanager: Don't use os.rename on non-POSIX. It doesn't overwrite exisitng files on Windows. 14 years ago
Kim Alvefur d434226dbe util.datamanager: Add missing mode flag to seek call 14 years ago
Kim Alvefur ce55d30151 util.datamanager: Remove a few unused imports 14 years ago
Kim Alvefur f69692e11d util.datamanager: Write to a temporary file and atomically move it into place 14 years ago
Kim Alvefur 72f5f1529c util.datamanager: Use pposix.fallocate() to make sure appends succeed. Also add a fallback fallocate() 14 years ago
Kim Alvefur 2d922cbb68 util.datamanager: Add function for removing all data belonging to a user 14 years ago
Kim Alvefur 88784b4275 util.datamanager: Add function for listing stores 14 years ago
Matthew Wild e808645b53 Hopefully inert commit to clean up logging across a number of modules, removing all cases of concatenation when building log messages 14 years ago
Florian Zeitz 40ea2230d1 Eliminate direct setfenv usage 14 years ago
James Callahan b66913bf3b util/datamanager: Use package.config to figure out directory seperator 15 years ago
Waqas Hussain d1d5bb6d1c util.datamanager: Return an error string when pcall fails on a loaded list file. 16 years ago
Waqas Hussain e74066417c util.datamanager: Return an error string when pcall fails on a loaded list file. 16 years ago
Waqas Hussain 899dfc6266 util.datamanager: When failing to load a list file, and the file exists, log an error, and return nil, error. 16 years ago
Waqas Hussain fc496f1fd1 util.datamanager: When failing to load a list file, and the file exists, log an error, and return nil, error. 16 years ago
Matthew Wild 327a174479 util.datamanager: Change from 'Failed to load' to 'Assuming empty' for data store files that do not seem to exist 16 years ago
Matthew Wild 99bfcca212 util.datamanager: Handle gracefully the lack of prosody.paths.data 16 years ago
Matthew Wild fb8362bbee util.datamanager: Use prosody.paths.data as the initial value for data_path 16 years ago
Waqas Hussain 42f63b21d7 util.datamanager: Return an error string when failing to save. 16 years ago
Waqas Hussain 4499df4f45 util.datamanager: When failing to load a file, and the file exists, return nil, error. 16 years ago
Matthew Wild 2bc0606453 Update copyright headers for 2010 16 years ago
Matthew Wild 942fd3d965 Backed out changeset cb1f9266130b: better way to achieve this to be committed Real Soon Now. 17 years ago
Waqas Hussain 3b288052d5 util.datamanager: Added support for hooks to override behavior. 17 years ago