From: Glenn Morris Date: Thu, 2 Aug 2012 04:06:38 +0000 (-0700) Subject: * src/nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR X-Git-Tag: emacs-24.2.90~904 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=90df0db330dc6d168bf8cdb950a066a2916857ad;p=emacs.git * src/nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR (rather than hard-coding the path separator). --- diff --git a/src/ChangeLog b/src/ChangeLog index 3954d489251..e10550957c8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-08-02 Glenn Morris + + * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than + hard-coding the path separator. + 2012-08-01 Paul Eggert Use "ASET (a, i, v)" rather than "AREF (a, i) = v". diff --git a/src/nsterm.m b/src/nsterm.m index 48a3b7543a8..4c0e0e57926 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -329,8 +329,7 @@ ns_exec_path (void) NSString *binDir = [bundle bundlePath]; NSString *resourcePath, *resourcePaths; NSRange range; - BOOL onWindows = NO; /* FIXME determine this somehow */ - NSString *pathSeparator = onWindows ? @";" : @":"; + NSString *pathSeparator = [NSString stringWithFormat: @"%c", SEPCHAR]; NSFileManager *fileManager = [NSFileManager defaultManager]; NSArray *paths; NSEnumerator *pathEnum; @@ -377,8 +376,7 @@ ns_load_path (void) NSBundle *bundle = [NSBundle mainBundle]; NSString *resourceDir = [bundle resourcePath]; NSString *resourcePath, *resourcePaths; - BOOL onWindows = NO; /* FIXME determine this somehow */ - NSString *pathSeparator = onWindows ? @";" : @":"; + NSString *pathSeparator = [NSString stringWithFormat: @"%c", SEPCHAR]; NSFileManager *fileManager = [NSFileManager defaultManager]; BOOL isDir; NSArray *paths = [resourceDir stringsByAppendingPaths: