[PATCH] Zotero .desktop file does not work when filename is provided as a URI

The zotero.desktop file has the following Exec line:

Exec=bash -c "$(dirname $(readlink -f %k))/zotero -url %U"

Unfortunately, this fails when %k expands to: file:///usr/local/share/applications/zotero.desktop or similar.

The following replacement line fixes the problem:

Exec=bash -c "$(dirname $(realpath $(echo %k | sed -e 's/^file:\/\///')))/zotero -url %U"

"Report errors" provides the following version information:

version => 5.0.92, platform => Linux x86_64, oscpu => Linux x86_64, locale => en-GB, appName => Zotero, appVersion => 5.0.92, extensions => Zotero LibreOffice Integration (5.0.25.SA.5.0.92, extension)

Best wishes,

Julian
  • This seems OK to me. I'm not totally clear on when it would be a URI, but the specification does say that it can be. I've made this change for the next version. Thanks.
Sign In or Register to comment.