Revision: 6953
http://skim-app.svn.sourceforge.net/skim-app/?rev=6953&view=rev
Author: hofman
Date: 2010-12-09 12:21:30 +0000 (Thu, 09 Dec 2010)
Log Message:
-----------
avoid some double checks for path in scripting bookmark creation
Modified Paths:
--------------
trunk/SKBookmark.m
Modified: trunk/SKBookmark.m
===================================================================
--- trunk/SKBookmark.m 2010-12-09 12:01:36 UTC (rev 6952)
+++ trunk/SKBookmark.m 2010-12-09 12:21:30 UTC (rev 6953)
@@ -620,7 +620,7 @@
aPageNumber--;
else
aPageNumber = [docClass isPDFDocument] ? 0 :
NSNotFound;
- if (aLabel == nil && aPath)
+ if (aLabel == nil)
aLabel = [[NSFileManager defaultManager]
displayNameAtPath:aPath];
bookmark = [[SKBookmark alloc] initWithPath:aPath
pageIndex:aPageNumber label:aLabel ?: @""];
} else {
@@ -631,11 +631,12 @@
}
case SKScriptingBookmarkTypeFolder:
{
- if (aLabel == nil && aPath)
- aLabel = [[NSFileManager defaultManager]
displayNameAtPath:aPath];
NSArray *aChildren = nil;
- if (aPath)
+ if (aPath) {
aChildren = [SKBookmark bookmarksForPaths:[[NSFileManager
defaultManager] contentsOfDirectoryAtPath:aPath error:NULL]
relativeToPath:aPath];
+ if (aLabel == nil)
+ aLabel = [[NSFileManager defaultManager]
displayNameAtPath:aPath];
+ }
bookmark = [[SKBookmark alloc]
initFolderWithChildren:aChildren label:aLabel ?: @""];
break;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:
WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit