Author: rmottola
Date: Thu Mar 10 18:42:21 2016
New Revision: 39521

URL: http://svn.gna.org/viewcvs/gnustep?rev=39521&view=rev
Log:
Simplify code by using stringByDeletingLastPathComponent

Modified:
    libs/gui/trunk/ChangeLog
    libs/gui/trunk/Source/NSWorkspace.m

Modified: libs/gui/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/ChangeLog?rev=39521&r1=39520&r2=39521&view=diff
==============================================================================
--- libs/gui/trunk/ChangeLog    (original)
+++ libs/gui/trunk/ChangeLog    Thu Mar 10 18:42:21 2016
@@ -1,3 +1,8 @@
+2016-03-10 Riccardo Mottola <[email protected]>
+
+       * Source/NSWorkspace.m
+       Simplify code by using stringByDeletingLastPathComponent
+
 2016-03-10 Riccardo Mottola <[email protected]>
 
        * Source/NSWorkspace.m

Modified: libs/gui/trunk/Source/NSWorkspace.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/NSWorkspace.m?rev=39521&r1=39520&r2=39521&view=diff
==============================================================================
--- libs/gui/trunk/Source/NSWorkspace.m (original)
+++ libs/gui/trunk/Source/NSWorkspace.m Thu Mar 10 18:42:21 2016
@@ -1394,13 +1394,7 @@
   */
   if ([fileType isEqual: NSFileTypeSymbolicLink] == YES)
     {
-      NSString *linkPath;
-      
-      linkPath = [mgr pathContentOfSymbolicLinkAtPath:fullPath];
-      if ([linkPath isAbsolutePath])
-       fullPath = linkPath;
-      else
-       fullPath = [[[fullPath stringByDeletingLastPathComponent] 
stringByAppendingPathComponent:linkPath] stringByStandardizingPath];
+      fullPath = [fullPath stringByResolvingSymlinksInPath];
 
       /* now we reget the target attributes */
       attributes = [mgr fileAttributesAtPath: fullPath traverseLink: NO];


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to