diff --git a/plugins/tiddlywiki/filesystem/filesystemadaptor.js b/plugins/tiddlywiki/filesystem/filesystemadaptor.js index 379d11ea0..bcbb687ff 100644 --- a/plugins/tiddlywiki/filesystem/filesystemadaptor.js +++ b/plugins/tiddlywiki/filesystem/filesystemadaptor.js @@ -64,7 +64,10 @@ FileSystemAdaptor.prototype.getTiddlerFileInfo = function(tiddler,callback) { fileInfo.type = ($tw.config.fileExtensionInfo[extension] || {type: "application/x-tiddler"}).type; // Use a .meta file unless we're saving a .tid file. // (We would need more complex logic if we supported other template rendered tiddlers besides .tid) - fileInfo.hasMetaFile = (fileInfo.type !== "application/x-tiddler"); + fileInfo.hasMetaFile = (fileInfo.type !== "application/x-tiddler") && (fileInfo.type !== "application/json"); + if(!fileInfo.hasMetaFile) { + extension = ".tid"; + } // Generate the base filepath and ensure the directories exist var baseFilepath = path.resolve($tw.boot.wikiTiddlersPath,this.generateTiddlerBaseFilepath(title)); $tw.utils.createFileDirectories(baseFilepath);