Hi,

I'm having a problem where modifying linked PDFs kept in Dropbox on a different 
computer can cause BibDesk to lose its link to the PDF.  

The problem occurs because the linked file alias has been resolved into an 
FSRef before the PDF was changed, and when the file is modified remotely, 
Dropbox *moves* the current version to a private cache in 
~/Dropbox/.dropbox.cache/ and creates a new file in the place of the old file.  
When BibDesk next asks for the URL for the file, BibDesk resolves the URL from 
the FSRef instead of the alias.  The FSRef now points to the PDF in Dropbox's 
private cache.  (This happens in -[BSDKLinkedAliasFile URL]).

My proposed solution is to notice if the URL has moved, and re-resolve the 
alias in this case.  This causes the correct file to be resolved.  I've 
attached a patch which corrects this problem.

Steps to reproduce:
1. Open BibDesk and select an entry whose linked file is in Dropbox.
2. Using the Dropbox web interface, replace this file with a different file.  
Wait for the file to sync back locally.
3. Switch back to BibDesk.  The linked file now points to 
~/Dropbox/.dropbox.cache and has "(deleted some_hash_value)" in the name.

Regards,
Graham

Attachment: dropbox-file-resolution-bug-fix.patch
Description: Binary data

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Bibdesk-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop

Reply via email to