write to file IO bugfix

10.3.x-maintenance
cTn 2014-02-22 21:23:06 +01:00
parent 23ad4a9426
commit 7d4e7f8310
1 changed files with 9 additions and 0 deletions

View File

@ -70,7 +70,16 @@ function configuration_backup() {
console.error(e);
};
var truncated = false;
writer.onwriteend = function() {
if (!truncated) {
// onwriteend will be fired again when truncation is finished
truncated = true;
writer.truncate(serialized_config_object.length);
return;
}
console.log('Write SUCCESSFUL');
};