Fix for (rare, I would think) "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIFile.create]" file sync error

This commit is contained in:
Dan Stillman 2009-09-18 05:01:42 +00:00
parent 385cb2f0b4
commit cde028b0f2

View file

@ -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);