www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit ff9e822bd37c63a328521c72f95bd0bb97a51215
parent a2b7f086d796b71dd6b236963d7d073c894f53a1
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 26 Oct 2016 02:15:56 -0400

Fix errors filtering filenames of synced file downloads

Diffstat:
Mchrome/content/zotero/xpcom/storage/storageLocal.js | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/xpcom/storage/storageLocal.js b/chrome/content/zotero/xpcom/storage/storageLocal.js @@ -642,6 +642,7 @@ Zotero.Sync.Storage.Local = { return false; } + var dir = OS.Path.dirname(path); var fileName = OS.Path.basename(path); var renamed = false; @@ -651,7 +652,7 @@ Zotero.Sync.Storage.Local = { if (filteredName != fileName) { Zotero.debug("Filtering filename '" + fileName + "' to '" + filteredName + "'"); fileName = filteredName; - path = OS.Path.dirname(path, fileName); + path = OS.Path.join(dir, fileName); renamed = true; } @@ -670,7 +671,7 @@ Zotero.Sync.Storage.Local = { Zotero.debug("Changed filename '" + fileName + "' to '" + finalFileName + "'"); fileName = finalFileName; - path = OS.Path.dirname(path, fileName); + path = OS.Path.join(dir, fileName); // Abort if Windows path limitation would cause filenames to be overly truncated if (Zotero.isWin && fileName.length < 40) { @@ -859,7 +860,7 @@ Zotero.Sync.Storage.Local = { throw new Error(msg); } - destPath = OS.Path.join(OS.Path.dirname(destPath, shortened)); + destPath = OS.Path.join(OS.Path.dirname(destPath), shortened); if (primaryFile) { renamed = true;