Closed whytong closed 3 years ago
What about these lines at the end of the function _get_zotero_prefs
(line 315 of python3/zotero.py
)?
# Workaround for Windows:
if self._dd == '' and os.getenv('ZoteroSQLpath'):
self._dd = os.path.dirname(os.environ['ZoteroSQLpath'])
Just tested. Yes, this works.
Thanks for reporting the issue and for the feedback.
Currently for zotcite/vim in Ubuntu on WSL2/Windows 10, if the Zotero is a native Windows application, the "data dir" is not set by zotcite and the Zotero does not have a
profile.ini
file, such that when you press<Leader>zo
, it points to a file under "/storage/..." which lacks the main data folder.Adding the "data dir" seems to solve this issue and the attachment can be opened. A quick fix is to patch the
python3/zotero.py
file with the following:But I did not test on Linux, it may not be compatible.
Can the "data dir" be set automatically if the
$ZoteroSQLpath
is set?