diff --git a/chrome/content/scrapbook/trade.js b/chrome/content/scrapbook/trade.js index b8504601..c949f9f4 100644 --- a/chrome/content/scrapbook/trade.js +++ b/chrome/content/scrapbook/trade.js @@ -390,8 +390,10 @@ var sbExportService = { item.exported = (new Date()).toISOString(); var num = 0, destDir, dirName; + var dirNameBase = sbCommonUtils.crop(sbCommonUtils.validateFileName(item.title), 60, 0, '') || "untitled"; + dirNameBase = sbCommonUtils.validateFileName(dirNameBase); // avoid potential bad filename such as trailing space do { - dirName = sbCommonUtils.validateFileName(item.title).substring(0,60) || "untitled"; + dirName = dirNameBase; if ( num > 0 ) dirName += "-" + num; dirName = dirName.replace(/\./g, ""); destDir = sbTradeService.rightDir.clone(); @@ -403,11 +405,7 @@ var sbExportService = { try { srcDir.copyTo(sbTradeService.rightDir, destDir.leafName); } catch(ex) { - try { - srcDir.copyTo(sbTradeService.rightDir, item.id); - } catch(ex) { - throw "Failed to copy files."; - } + throw "Failed to copy files."; } if (item.type == "folder" || item.type == "bookmark" || item.type == "separator") sbCommonUtils.removeDirSafety(srcDir); diff --git a/doc/releases/1.14.4.txt b/doc/releases/1.14.4.txt new file mode 100644 index 00000000..f97fe986 --- /dev/null +++ b/doc/releases/1.14.4.txt @@ -0,0 +1,8 @@ +Scrapbook X 1.14.4 +================== + +Changes since v1.14.3 +--------------------- + + * Fixed an issue that the exported item folder be named after its ID + instead of its title. diff --git a/install.rdf b/install.rdf index c0b8b2f2..8505e030 100644 --- a/install.rdf +++ b/install.rdf @@ -6,7 +6,7 @@ scrapbookx@addons.mozilla.org 2 - 1.14.3 + 1.14.4 false false false