From 513e1c8cbbccbf52150f21fa5e574a6d7f6dc01a Mon Sep 17 00:00:00 2001 From: Andreas Hahn Date: Tue, 16 Dec 2014 00:51:30 +0100 Subject: [PATCH] Filename will now be set to "tiddlywiki.html" when path does not contain a filename. --- core/modules/savers/download.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/modules/savers/download.js b/core/modules/savers/download.js index 0192cfd69..8d1436f29 100644 --- a/core/modules/savers/download.js +++ b/core/modules/savers/download.js @@ -26,10 +26,11 @@ DownloadSaver.prototype.save = function(text,method,callback,options) { var p = document.location.pathname.lastIndexOf("/"); if(p !== -1) { filename = document.location.pathname.substr(p+1); - } else { - filename = "tiddlywiki.html"; } } + if(!filename) { + filename = "tiddlywiki.html"; + } // Set up the link var link = document.createElement("a"); link.setAttribute("target","_blank");