It's not clear when this became an issue, but our usual background HTTP
requests (set that way to avoid triggering auth prompts when saving from
websites) weren't triggering proxy authentication dialogs, which was breaking
most network activity in Standalone. To fix this, we now make a foreground
request at startup to a file on S3 and resolve the Zotero.proxyAuthComplete
promise when we're done. Any network requests that want to wait for proxy
authentication can wait for that promise.
This behavior can be disabled via the triggerProxyAuthentication hidden pref.
It's possible for filesEditable in the DB to be set to 1 even if
editable is 0. We generally check editable first anyway, but let's be
safe.
Also make editable/filesEditable return booleans instead of numbers
Two changes needed to cope with shift-enter being pressed both
with and without changes to current creator row
Signed-off-by: J Richard Snape <rsnape@dmu.ac.uk>
Dual boot and VM setups worked, but only absolute paths were synced,
because syncing uses attachmentPath, which was resolving relative paths
itself (#51). attachmentPath now returns what's in the database (as it
did originally), and getFile() does the resolving instead.
This means that anything relying on attachmentPath directly needs to be
aware that it might get a placeholder-prefixed relative path.
Otherwise, the bottom of the document preferences window can be
cut off the first time it is displayed. A styleChanged event is still
fired after setting the selection.
This fixes the problem for attached files. I assume this is still a
problem for importSnapshotFromFile(), which uses copyTo() on a
directory. For that we'd need a copyDirectoryToUnique() function that
shortened the names of all files in the directory.
cloudme.com and maybe box.com appear to have stopped sending a
Last-Modified header for files, causing Zotero to skip the file download
step. Instead of relying on that, we now save a random id to the
lastsync file and just use that as an ETag.
Also migrate lastsync to lastsync.txt, which might be supported better
on some other broken WebDAV servers.