Revision: 21603 http://sourceforge.net/p/bibdesk/svn/21603 Author: hofman Date: 2017-10-29 16:39:21 +0000 (Sun, 29 Oct 2017) Log Message: ----------- combine two statements
Modified Paths: -------------- trunk/bibdesk/NSURL_BDSKExtensions.m Modified: trunk/bibdesk/NSURL_BDSKExtensions.m =================================================================== --- trunk/bibdesk/NSURL_BDSKExtensions.m 2017-10-29 16:12:25 UTC (rev 21602) +++ trunk/bibdesk/NSURL_BDSKExtensions.m 2017-10-29 16:39:21 UTC (rev 21603) @@ -131,12 +131,9 @@ fileURL = CFURLCreateFromFSRef(allocator, &fileRef); CFRelease(oldURL); - // if there are no more components, we're done - if (idx == 0) break; + // if there are no more components, we're done, otherwise get next component + if (idx-- == 0) break; - // get next component, note we added at the end - idx--; - oldURL = fileURL; fileURL = CFURLCreateCopyAppendingPathComponent(allocator, fileURL, CFArrayGetValueAtIndex(strippedComponents, idx), idx > 0); CFRelease(oldURL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit