commit cde028b0f2dc86beec56c11daa2c652250b5e593 parent 385cb2f0b44a5b18ca3676b348ccff222819f37f Author: Dan Stillman <dstillman@zotero.org> Date: Fri, 18 Sep 2009 05:01:42 +0000 Fix for (rare, I would think) "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIFile.create]" file sync error Diffstat:
| M | chrome/content/zotero/xpcom/storage.js | | | 5 | +++++ |
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js @@ -795,6 +795,11 @@ Zotero.Sync.Storage = new function () { continue; } + // Make sure the new filename is valid, in case an invalid character + // for this OS somehow make it into the ZIP (e.g., from before we checked + // for them or if a user manually renamed and relinked a file on another OS) + fileName = Zotero.File.getValidFileName(fileName); + Zotero.debug("Extracting " + fileName); var destFile = parentDir.clone(); destFile.QueryInterface(Components.interfaces.nsILocalFile);