Revision: 10951
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=10951&view=rev
Author:   hofman
Date:     2007-08-20 02:05:28 -0700 (Mon, 20 Aug 2007)

Log Message:
-----------
Use NSString convenience method to detect absolute paths.

Modified Paths:
--------------
    trunk/bibdesk/BibFiler.m
    trunk/bibdesk/NSFileManager_BDSKExtensions.m

Modified: trunk/bibdesk/BibFiler.m
===================================================================
--- trunk/bibdesk/BibFiler.m    2007-08-20 08:58:13 UTC (rev 10950)
+++ trunk/bibdesk/BibFiler.m    2007-08-20 09:05:28 UTC (rev 10951)
@@ -592,7 +592,7 @@
                     // unfortunately NSFileManager cannot reliably move 
symlinks...
                     if([fileType isEqualToString:NSFileTypeSymbolicLink]){
                         NSString *pathContent = [self 
pathContentOfSymbolicLinkAtPath:resolvedPath];
-                        if(![pathContent hasPrefix:@"/"]){// it links to a 
relative path
+                        if([pathContent isAbsolutePath] == NO){// it links to 
a relative path
                             pathContent = [[resolvedPath 
stringByDeletingLastPathComponent] stringByAppendingPathComponent:pathContent];
                         }
                         if(![self createSymbolicLinkAtPath:resolvedNewPath 
pathContent:pathContent]){

Modified: trunk/bibdesk/NSFileManager_BDSKExtensions.m
===================================================================
--- trunk/bibdesk/NSFileManager_BDSKExtensions.m        2007-08-20 08:58:13 UTC 
(rev 10950)
+++ trunk/bibdesk/NSFileManager_BDSKExtensions.m        2007-08-20 09:05:28 UTC 
(rev 10951)
@@ -275,8 +275,8 @@
 
 - (NSString *)uniqueFilePathWithName:(NSString *)fileName atPath:(NSString 
*)directory {
     // could expand this path?
-    NSParameterAssert([directory hasPrefix:[NSString pathSeparator]]);
-    NSParameterAssert([fileName hasPrefix:[NSString pathSeparator]] == NO);
+    NSParameterAssert([directory isAbsolutePath]);
+    NSParameterAssert([fileName isAbsolutePath] == NO);
     NSString *baseName = [fileName stringByDeletingPathExtension];
     NSString *extension = [fileName pathExtension];
     


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to