Software /
code /
prosody
Comparison
util/datamanager.lua @ 12387:05c250fa335a
Spelling: Fix various spelling mistakes (thanks timeless)
Words, sometimes I wonder how they even work
Maybe I missed something.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 07 Mar 2022 00:13:56 +0100 |
parent | 11369:87105a9a11df |
child | 12388:50fcd3879482 |
comparison
equal
deleted
inserted
replaced
12386:2d3080d02960 | 12387:05c250fa335a |
---|---|
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-exisitng files | 225 -- platform independent way of checking for non-existing 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-exisitng files | 293 -- platform independent way of checking for non-existing 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 = {}; |