Software /
code /
prosody
Comparison
util/datamanager.lua @ 12388:50fcd3879482 0.12.0
spelling: non-existing mistakes (thanks timeless)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 07 Mar 2022 00:35:29 +0100 |
parent | 12387:05c250fa335a |
child | 12975:d10957394a3c |
comparison
equal
deleted
inserted
replaced
12387:05c250fa335a | 12388:50fcd3879482 |
---|---|
220 if next(data) == nil then -- try to delete empty datastore | 220 if next(data) == nil then -- try to delete empty datastore |
221 log("debug", "Removing empty %s datastore for user %s@%s", datastore, username or "nil", host or "nil"); | 221 log("debug", "Removing empty %s datastore for user %s@%s", datastore, username or "nil", host or "nil"); |
222 os_remove(getpath(username, host, datastore)); | 222 os_remove(getpath(username, host, datastore)); |
223 end | 223 end |
224 -- we write data even when we are deleting because lua doesn't have a | 224 -- we write data even when we are deleting because lua doesn't have a |
225 -- platform independent way of checking for non-existing files | 225 -- platform independent way of checking for nonexisting files |
226 until ok; | 226 until ok; |
227 return true; | 227 return true; |
228 end | 228 end |
229 | 229 |
230 -- Append a blob of data to a file | 230 -- Append a blob of data to a file |
288 if next(data) == nil then -- try to delete empty datastore | 288 if next(data) == nil then -- try to delete empty datastore |
289 log("debug", "Removing empty %s datastore for user %s@%s", datastore, username or "nil", host or "nil"); | 289 log("debug", "Removing empty %s datastore for user %s@%s", datastore, username or "nil", host or "nil"); |
290 os_remove(getpath(username, host, datastore, "list")); | 290 os_remove(getpath(username, host, datastore, "list")); |
291 end | 291 end |
292 -- we write data even when we are deleting because lua doesn't have a | 292 -- we write data even when we are deleting because lua doesn't have a |
293 -- platform independent way of checking for non-existing files | 293 -- platform independent way of checking for nonexisting files |
294 return true; | 294 return true; |
295 end | 295 end |
296 | 296 |
297 local function list_load(username, host, datastore) | 297 local function list_load(username, host, datastore) |
298 local items = {}; | 298 local items = {}; |