Restore proper error for Show File on missing file
This commit is contained in:
parent
a1ce85decb
commit
002dd66e03
1 changed files with 3 additions and 2 deletions
|
@ -3940,8 +3940,9 @@ var ZoteroPane = new function()
|
||||||
this.showAttachmentInFilesystem = Zotero.Promise.coroutine(function* (itemID, noLocateOnMissing) {
|
this.showAttachmentInFilesystem = Zotero.Promise.coroutine(function* (itemID, noLocateOnMissing) {
|
||||||
var attachment = yield Zotero.Items.getAsync(itemID)
|
var attachment = yield Zotero.Items.getAsync(itemID)
|
||||||
if (attachment.attachmentLinkMode != Zotero.Attachments.LINK_MODE_LINKED_URL) {
|
if (attachment.attachmentLinkMode != Zotero.Attachments.LINK_MODE_LINKED_URL) {
|
||||||
var file = attachment.getFile();
|
var path = yield attachment.getFilePathAsync();
|
||||||
if (file) {
|
if (path) {
|
||||||
|
let file = Zotero.File.pathToFile(path);
|
||||||
try {
|
try {
|
||||||
file.reveal();
|
file.reveal();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue