commit 70ebccc8271321a98707fbb19b1654c1171711b9
parent 9b7070ad3866262f0ce6e19a9192676acb067dab
Author: Dan Stillman <dstillman@zotero.org>
Date: Mon, 27 Jul 2009 22:45:07 +0000
Fix for file attachment links being broken after renaming file
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js
@@ -995,13 +995,12 @@ Zotero.Attachments = new function(){
* descriptor for files outside the storage directory
*/
function getPath(file, linkMode) {
+ file.QueryInterface(Components.interfaces.nsILocalFile);
if (linkMode == self.LINK_MODE_IMPORTED_URL ||
linkMode == self.LINK_MODE_IMPORTED_FILE) {
- file.QueryInterface(Components.interfaces.nsILocalFile);
var fileName = file.getRelativeDescriptor(file.parent);
return 'storage:' + fileName;
}
-
return file.persistentDescriptor;
}