mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
bug fix
Createdirectory is removed as $tw.utils.createFileDirectories does it's work Fixed a bug for when tv-get-export-path returns null.
This commit is contained in:
parent
cf59e7a71b
commit
1901702557
@ -44,7 +44,6 @@ Command.prototype.execute = function() {
|
|||||||
if(deleteDirectory){
|
if(deleteDirectory){
|
||||||
$tw.utils.deleteDirectory(pathname);
|
$tw.utils.deleteDirectory(pathname);
|
||||||
}
|
}
|
||||||
$tw.utils.createDirectory(pathname);
|
|
||||||
$tw.utils.each(tiddlers,function(title) {
|
$tw.utils.each(tiddlers,function(title) {
|
||||||
var parser = wiki.parseTiddler(template),
|
var parser = wiki.parseTiddler(template),
|
||||||
widgetNode = wiki.makeWidget(parser,{variables: {currentTiddler: title}});
|
widgetNode = wiki.makeWidget(parser,{variables: {currentTiddler: title}});
|
||||||
@ -53,7 +52,10 @@ Command.prototype.execute = function() {
|
|||||||
var text = type === "text/html" ? container.innerHTML : container.textContent;
|
var text = type === "text/html" ? container.innerHTML : container.textContent;
|
||||||
var export_path = null;
|
var export_path = null;
|
||||||
if($tw.utils.hop($tw.macros,"tv-get-export-path")) {
|
if($tw.utils.hop($tw.macros,"tv-get-export-path")) {
|
||||||
export_path = path.resolve(outputPath,$tw.macros["tv-get-export-path"].run.apply(self,[title]) + extension);
|
var macroPath = $tw.macros["tv-get-export-path"].run.apply(self,[title]);
|
||||||
|
if(macroPath){
|
||||||
|
export_path = path.resolve( outputPath, macroPath + extension);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var final_path = export_path || path.resolve(pathname,encodeURIComponent(title) + extension);
|
var final_path = export_path || path.resolve(pathname,encodeURIComponent(title) + extension);
|
||||||
$tw.utils.createFileDirectories(final_path);
|
$tw.utils.createFileDirectories(final_path);
|
||||||
|
Loading…
Reference in New Issue
Block a user