Skip to content

Commit

Permalink
Fix path format for backslashes on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
rfm committed Nov 21, 2023
1 parent 5917e32 commit d98bc5c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2023-11-21 Richard Frith-Macdonald <rfm@gnu.org>

* Source/objc-load.m: Fix to get library path in standardised form to
match code for getting executable path.

2023-11-21 Richard Frith-Macdonald <rfm@gnu.org>

* Headers/GNUstepBase/GSVersionMacros.h: Added GS_UNIMPLEMENTED to
Expand Down
14 changes: 12 additions & 2 deletions Source/objc-load.m
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@
#warning Under Cygwin, we may want to use cygwin_conv_path() to get the unix path back?
#endif
s = [NSString stringWithCharacters: buf length: wcslen(buf)];
s = [s stringByResolvingSymlinksInPath];
s = [s stringByStandardizingPath];
}
return s;
}
Expand All @@ -275,7 +277,11 @@
*/
if (0 != dladdr((void*)theClass, &info))
{
return [NSString stringWithUTF8String: info.dli_fname];
NSString *s;

s = [NSString stringWithUTF8String: info.dli_fname];
s = [s stringByResolvingSymlinksInPath];
s = [s stringByStandardizingPath];
}
#endif

Expand Down Expand Up @@ -317,7 +323,11 @@

if (ret)
{
return [NSString stringWithUTF8String: ret];
NSString *s;

s = [NSString stringWithUTF8String: ret];
s = [s stringByResolvingSymlinksInPath];
s = [s stringByStandardizingPath];
}
}
return nil;
Expand Down

0 comments on commit d98bc5c

Please sign in to comment.