mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-07 17:28:05 +00:00
Revert "Update sync methods (#5467)"
This reverts commit 8d7930f660.
See the discussion at https://github.com/Jermolene/TiddlyWiki5/pull/5467#issuecomment-873590578https://github.com/Jermolene/TiddlyWiki5/pull/5467#issuecomment-873590578
This commit is contained in:
@@ -75,14 +75,7 @@ FileSystemAdaptor.prototype.getTiddlerFileInfo = function(tiddler,callback) {
|
||||
/*
|
||||
Save a tiddler and invoke the callback with (err,adaptorInfo,revision)
|
||||
*/
|
||||
FileSystemAdaptor.prototype.saveTiddler = function(tiddler,options,callback) {
|
||||
// Check for pre v5.2.0 method signature:
|
||||
if(typeof callback !== "function" && typeof options === "function"){
|
||||
var optionsArg = callback;
|
||||
callback = options;
|
||||
options = optionsArg;
|
||||
}
|
||||
options = options || {};
|
||||
FileSystemAdaptor.prototype.saveTiddler = function(tiddler,callback,options) {
|
||||
var self = this;
|
||||
var syncerInfo = options.tiddlerInfo || {};
|
||||
this.getTiddlerFileInfo(tiddler,function(err,fileInfo) {
|
||||
@@ -124,28 +117,14 @@ 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,options,callback) {
|
||||
// Check for pre v5.2.0 method signature:
|
||||
if(typeof callback !== "function" && typeof options === "function"){
|
||||
var optionsArg = callback;
|
||||
callback = options;
|
||||
options = optionsArg;
|
||||
}
|
||||
options = options || {};
|
||||
FileSystemAdaptor.prototype.loadTiddler = function(title,callback) {
|
||||
callback(null,null);
|
||||
};
|
||||
|
||||
/*
|
||||
Delete a tiddler and invoke the callback with (err)
|
||||
*/
|
||||
FileSystemAdaptor.prototype.deleteTiddler = function(title,options,callback) {
|
||||
// Check for pre v5.2.0 method signature:
|
||||
if(typeof callback !== "function" && typeof options === "function"){
|
||||
var optionsArg = callback;
|
||||
callback = options;
|
||||
options = optionsArg;
|
||||
}
|
||||
options = options || {};
|
||||
FileSystemAdaptor.prototype.deleteTiddler = function(title,callback,options) {
|
||||
var self = this,
|
||||
fileInfo = this.boot.files[title];
|
||||
// Only delete the tiddler if we have writable information for the file
|
||||
|
||||
Reference in New Issue
Block a user