mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-06-19 23:14:09 +00:00
Cleaning up the previous commit
This commit is contained in:
parent
10b192e743
commit
d75db05ea6
@ -26,8 +26,7 @@ FileSystemAdaptor.prototype.getTiddlerInfo = function(tiddler) {
|
|||||||
$tw.config.typeInfo = {
|
$tw.config.typeInfo = {
|
||||||
"text/vnd.tiddlywiki": {
|
"text/vnd.tiddlywiki": {
|
||||||
fileType: "application/x-tiddler",
|
fileType: "application/x-tiddler",
|
||||||
extension: ".tid",
|
extension: ".tid"
|
||||||
template: "$:/core/templates/tid-tiddler"
|
|
||||||
},
|
},
|
||||||
"image/jpeg" : {
|
"image/jpeg" : {
|
||||||
hasMetaFile: true
|
hasMetaFile: true
|
||||||
@ -104,9 +103,7 @@ FileSystemAdaptor.prototype.saveTiddler = function(tiddler,callback) {
|
|||||||
}
|
}
|
||||||
if(fileInfo.hasMetaFile) {
|
if(fileInfo.hasMetaFile) {
|
||||||
// Save the tiddler as a separate body and meta file
|
// Save the tiddler as a separate body and meta file
|
||||||
console.log("Saving fileInfo",fileInfo)
|
|
||||||
var typeInfo = $tw.config.contentTypeInfo[fileInfo.type];
|
var typeInfo = $tw.config.contentTypeInfo[fileInfo.type];
|
||||||
console.log("Saving typeInfo",typeInfo)
|
|
||||||
fs.writeFile(fileInfo.filepath,tiddler.fields.text,{encoding: typeInfo.encoding},function(err) {
|
fs.writeFile(fileInfo.filepath,tiddler.fields.text,{encoding: typeInfo.encoding},function(err) {
|
||||||
if(err) {
|
if(err) {
|
||||||
return callback(err);
|
return callback(err);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user