comparison mod_storage_xmlarchive/mod_storage_xmlarchive.lua @ 1738:b3f048af2dfe

mod_storage_xmlarchive: The last :seek() should return something truish, if not, don't ignore
author Kim Alvefur <zash@zash.se>
date Mon, 18 May 2015 02:33:43 +0200
parents e02af2b32f30
children 940a4ab75cec
comparison
equal deleted inserted replaced
1737:2ee9725c7fc6 1738:b3f048af2dfe
10 local fake_data = (" "):rep(len); 10 local fake_data = (" "):rep(len);
11 local ok, msg = f:write(fake_data); 11 local ok, msg = f:write(fake_data);
12 if not ok then 12 if not ok then
13 return ok, msg; 13 return ok, msg;
14 end 14 end
15 f:seek("set", offset); 15 return f:seek("set", offset);
16 return true;
17 end; 16 end;
18 pcall(function() 17 pcall(function()
19 local pposix = require "util.pposix"; 18 local pposix = require "util.pposix";
20 fallocate = pposix.fallocate or fallocate; 19 fallocate = pposix.fallocate or fallocate;
21 end); 20 end);