1
0
Fork 0
mirror of https://github.com/bjc/prosody.git synced 2025-04-06 06:37:37 +03:00
Commit graph

106 commits

Author SHA1 Message Date
Kim Alvefur
43b814a83b vairious: Add annotation when an empty environment is set [luacheck] 2018-02-28 20:06:26 +01:00
Kim Alvefur
2572082717 util.datamanager: Encode the 'store' path component, preserving underscores 2017-10-08 18:34:57 +02:00
Kim Alvefur
33be2cd463 util.datamanager: Use already known index instead of measuring length each iteration 2017-04-17 03:26:21 +02:00
Kim Alvefur
0f578fb9f3 util.datamanager: Log where the error came from 2017-03-28 17:31:55 +02:00
Kim Alvefur
5c4a8d13e2 util.datamanager: Rearrange locals 2017-03-28 17:31:24 +02:00
Kim Alvefur
7b4ad0e694 util.datamanager: Use pposix.atomic_append 2017-02-28 11:33:43 +01:00
Kim Alvefur
2e06e8e75d util.datamanager: Remove check for file non-existence since ENOENT tells us that already 2017-03-22 12:02:52 +01:00
Kim Alvefur
d496a96705 util.datamanager: Split long line [luacheck] 2017-03-22 12:00:21 +01:00
Kim Alvefur
cb0953029e util.datamanager: Expose atomic_store as store_raw 2017-03-01 17:37:29 +01:00
Kim Alvefur
c3aae40b19 util.datamanager: Use atomic store function when writing the first entry of a list 2017-03-01 17:15:56 +01:00
Kim Alvefur
f0c676e8c6 util.datamanager: Import value of ENOENT from util.pposix (if available) 2017-03-01 17:04:48 +01:00
Kim Alvefur
fc38b8c4f4 util.datamanager: Ignore ENOENT (no such file) when loading data 2017-03-01 16:44:59 +01:00
Kim Alvefur
f36fed39e8 util.datamanager: Shorter pattern 2016-11-20 12:06:36 +01:00
Kim Alvefur
f0bd3ec403 util.datamanager: Remove extraneous decoding of + to space, which we never never encode to 2016-11-20 12:05:43 +01:00
Kim Alvefur
e3ab638262 util.datamanager: Use the 'base' argument to tonumber() to indicate hexadecimal 2016-11-20 12:03:24 +01:00
Kim Alvefur
d56bd9dbdb util.datamanager: Add annotations to ignore name clashes [luacheck] 2016-09-24 18:31:16 +02:00
Kim Alvefur
c331fe1594 util.datamanager: Rename variables to avoid name clashes [luacheck] 2016-09-24 18:31:00 +02:00
Kim Alvefur
baba98852d util.datamanager: Import tostring and type (fix global access) 2016-05-22 14:38:07 +02:00
Kim Alvefur
afe389d870 util.datamanager: Explicit handling of each error condition (see ) 2016-02-27 15:29:56 +01:00
Kim Alvefur
d17785e91f Merge 0.9->0.10 2016-02-25 22:37:41 +01:00
Kim Alvefur
fc2ad03510 util.datamanager: Unreference file handle after closing it to prevent trying to close it again (fixes ) 2016-02-25 22:36:42 +01:00
Kim Alvefur
30b54f4ad7 util.datamanager: Add append to public api 2015-12-11 20:31:55 +01:00
Kim Alvefur
7816dfc838 util.datamanager: Return extra location info 2015-12-11 20:31:19 +01:00
Kim Alvefur
206330cea1 util.datamanager: Make sure only strings are passed as data to append() 2015-12-11 20:30:39 +01:00
Kim Alvefur
1510dd113d util.datamanager: Add some comments about the append function 2015-12-11 20:29:55 +01:00
Kim Alvefur
4b380b1cbf util.datamanager: Handle potential error from :write() call 2015-12-11 20:26:04 +01:00
Kim Alvefur
be1b771edf util.datamanager: Handle potential issues from fallocate 2015-12-11 20:24:36 +01:00
Kim Alvefur
74500e9b50 util.datamanager: No shadowing of variable [luacheck] 2015-12-11 20:22:54 +01:00
Kim Alvefur
74caca930a util.datamanager: Skip past second check if first attemtp to open file succeeds 2015-12-11 20:18:24 +01:00
Kim Alvefur
8ecd4052a5 util.datamanager: In append() collect status when closing file handle as it may fail (eg the implied flush) 2015-12-11 20:13:37 +01:00
Kim Alvefur
2ccee846f2 util.datamanager: Overwrite 'data' variable instead of shadownig it [luacheck] 2015-12-11 20:11:48 +01:00
Kim Alvefur
3e9c86d509 util.datamanager: Factor out code for appending bytes to a file 2015-12-11 20:07:22 +01:00
Kim Alvefur
eaa823a597 util.*: Remove use of module() function, make all module functions local and return them in a table at the end 2015-02-21 10:36:37 +01:00
Kim Alvefur
4beb76ca0d util.datamanager: Fix traceback from trying to purge when storage is empty or otherwise unaccessible (fixes ) 2015-05-13 21:44:13 +02:00
Kim Alvefur
2064173f3b util.datamanager: Fix traceback due to %s in log message 2015-04-03 12:10:30 +02:00
Kim Alvefur
158dc0f9e1 util.datamanager: Check that the global 'prosody' exists before using it (fixes nil indexing in use outside of prosody) 2015-02-20 19:00:01 +01:00
Matthew Wild
f056043347 util.datamanager: Clear the cache of created directories on storage failure, and retry 2013-04-07 20:28:12 +01:00
Marco Cirillo
2e7d2a24ce util.datamanager: expose path decode and encode functions. 2013-04-07 16:56:49 +00:00
Kim Alvefur
17bfb654df util.datamanager: Don't escape the name of a store 2012-12-16 14:36:24 +01:00
Kim Alvefur
1d8297ca4f util.datamanager: Remove unused variable 2012-12-14 14:25:58 +01:00
Kim Alvefur
4d762f9cbf util.datamanager: Remove dead code path 2012-12-14 14:21:32 +01:00
Kim Alvefur
196022f3f5 mod_storage_internal, datamanager: Add support for iterating over users with data in a store 2012-09-21 17:23:08 +02:00
Kim Alvefur
07bb8a42ce storagemanager, datamanager, mod_storage_{internal,sql}: Replace list_stores() with an iterator version 2012-09-17 05:42:10 +02:00
Waqas Hussain
184e6cad28 util.datamanager: Make the util.pposix dependency optional. 2012-09-12 22:03:06 +05:00
Kim Alvefur
4e9c9163be util.datamanager: Ignore errors if the file is gone after removing it 2012-08-26 20:53:40 +02:00
Kim Alvefur
40c2d90481 util.datamanager: Collect errors when deleting all stores of a user, but ignore "no such file" 2012-08-25 01:21:41 +02:00
Matthew Wild
d4d93a75bb Merge Waqas<>Zash 2012-07-31 23:07:02 +01:00
Kim Alvefur
5539608830 util.datamanager: Try to open in read+write mode, then retry with write mode if that fails (usually because it doesn't exist) 2012-07-31 23:34:11 +02:00
Waqas Hussain
2161f2e88c util.datamanager: Don't use os.rename on non-POSIX. It doesn't overwrite exisitng files on Windows. 2012-08-01 01:36:34 +05:00
Kim Alvefur
161a78b35b util.datamanager: Add missing mode flag to seek call 2012-07-31 08:23:55 +02:00