mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 05:32:11 +00:00
Simplify code by using stringByDeletingLastPathComponent
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@39521 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c51df6b189
commit
e00f1870c6
2 changed files with 6 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
|||
2016-03-10 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Source/NSWorkspace.m
|
||||
Simplify code by using stringByDeletingLastPathComponent
|
||||
|
||||
2016-03-10 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Source/NSWorkspace.m
|
||||
|
|
|
@ -1394,13 +1394,7 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
|
|||
*/
|
||||
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];
|
||||
|
|
Loading…
Reference in a new issue