Mercurial > prosody-modules
comparison mod_storage_xmlarchive/datamanager_append_raw.lib.lua @ 2343:f4ab0966ba89
mod_storage_xmlarchive: Fix name in datamanager monkeypatch (fixes #774)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 04 Nov 2016 19:14:05 +0100 |
| parents | aa984980a4dc |
| children |
comparison
equal
deleted
inserted
replaced
| 2342:6848297cf40a | 2343:f4ab0966ba89 |
|---|---|
| 1 local io_open = io.open; | 1 local io_open = io.open; |
| 2 local dm = require "core.storagemanager".olddm; | 2 local dm = require "core.storagemanager".olddm; |
| 3 | 3 |
| 4 -- Append a blob of data to a file | 4 -- Append a blob of data to a file |
| 5 function dm.append(username, host, datastore, ext, data) | 5 function dm.append_raw(username, host, datastore, ext, data) |
| 6 if type(data) ~= "string" then return; end | 6 if type(data) ~= "string" then return; end |
| 7 local filename = dm.getpath(username, host, datastore, ext, true); | 7 local filename = dm.getpath(username, host, datastore, ext, true); |
| 8 | 8 |
| 9 local ok; | 9 local ok; |
| 10 local f, msg = io_open(filename, "r+"); | 10 local f, msg = io_open(filename, "r+"); |
