On Jan 17, 2013, at 20:56 , Graham Dennis <[email protected]> wrote:

> 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.

I'm not entirely in favor of this, as it seems like a pretty big change from 
existing behavior.  Suppose you have a reference with linked file at 
~/foobar.pdf.  With BibDesk running, you can move that file in Finder to 
~/Documents/foobar2013.pdf, and BibDesk should track it.  Suppose you then 
create another file at ~/foobar.pdf. If I recall the BD design correctly, the 
reference should point to ~/Documents/foobar2013.pdf, whereas with your patch 
it sounds like it would point to ~/foobar.pdf?

Part of the point of using FSRefs is that you avoid mucking about with fragile 
path comparisons, so that makes me a bit nervous too.  In fact, -[NSURL 
isEqual:] will actually fail (or at least it used to) by returning NO for the 
same URL returned from different APIs.

If the idea is to add a workaround specifically for Dropbox, do they guarantee 
anything about the location?  Will it always be under ~/Dropbox/.dropbox.cache? 
 Hitting the filesystem or comparing URLs is pretty slow, though...your way 
might be the only one, but it would be nice to understand the implications.

Adam


------------------------------------------------------------------------------
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