1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-25 01:20:30 +00:00

Fix file system behaviour for loading new tiddlers

We don’t need to load tiddlers because they will all have been loaded
during bootup, or been created through the file system adaptor.
This commit is contained in:
Jermolene 2013-12-11 11:45:15 +00:00
parent 2e0e8a879f
commit 062822d45c
2 changed files with 6 additions and 2 deletions

View File

@ -460,7 +460,9 @@ Syncer.prototype.dispatchTask = function(task,callback) {
return callback(err); return callback(err);
} }
// Store the tiddler // Store the tiddler
if(tiddlerFields) {
self.storeTiddler(tiddlerFields); self.storeTiddler(tiddlerFields);
}
// Invoke the callback // Invoke the callback
callback(null); callback(null);
}); });

View File

@ -178,10 +178,12 @@ console.log("FileSystem: Saved file",fileInfo.filepath);
/* /*
Load a tiddler and invoke the callback with (err,tiddlerFields) Load a tiddler and invoke the callback with (err,tiddlerFields)
We don't need to implement loading for the file system adaptor, because all the tiddler files will have been loaded during the boot process.
*/ */
FileSystemAdaptor.prototype.loadTiddler = function(title,callback) { FileSystemAdaptor.prototype.loadTiddler = function(title,callback) {
console.log("FileSystem: Loading",title); console.log("FileSystem: Loading",title);
callback(null,{title: title, text: "Fake tiddler: " + title}); callback(null,null);
}; };
/* /*