On Jan 18, 2013, at 08:03, Christiaan Hofman wrote: > > On Jan 18, 2013, at 15:52, Colin A. Smith wrote: > >> Here's a possible solution to the Dropbox problem (at least as Dropbox >> currently works): slightly expand the conditions upon which a fileRef is >> invalid. A fileRef could be considered invalid not only if it couldn't be >> resolved, but also if it resolves to a file that has an ancestor directory >> that starts with a dot. This would also address the possible case of a user >> manually moving a linked file to the Trash (i.e. ~/.Trash), then replacing >> it with a new file of the same name in the original location. If I were a >> user, I'd expect BibDesk to link to the new file, not the old file sitting >> in the Trash. >> >> Cheers. >> >> -Colin > > You fail to appreciate the pont. The point is that we update the fileRef only > when we are forced to update because it is already garbage. We won't update > it when we may not like where it point to for some reason. Because that could > mean that we end up pointing nowhere.
Good point. I was heading down that road by asking if Dropbox always used ~/Dropbox/.whatever, but hardcoding that would be wrong. Checking for a ".*" directory somewhere in the path would be slow and error prone (handling things like symlinks and aliases), and still just a heuristic. If Dropbox is moving a file, that's a bug in Dropbox. The FSRef is the true representation of the file in BibDesk; the aliases/paths are just a way of serializing it in the most bulletproof way possible. You can move/rename files externally while BibDesk is open, but as long as you save the document, the links will be preserved. That is intended behavior. If someone were writing this today, using NSURL bookmarks would be the sensible way to go, and presumably things would be simpler. It's not clear to me if they would be as robust, but the point is that you'd be limited to Apple's API and any heuristics they applied. 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
