From 89954986bbb2fcba385d3813dde43b70224b1795 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 31 Aug 2016 17:01:27 +0000 Subject: [PATCH] Remove another instance of the USING_XCODE preprocessor variable git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11912 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- test/demo.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/demo.cxx b/test/demo.cxx index 17cd920b2..6ba07b543 100644 --- a/test/demo.cxx +++ b/test/demo.cxx @@ -306,13 +306,11 @@ void dobut(Fl_Widget *, long arg) CFStringGetCString(cc_app_path, app_path, 2048, kCFStringEncodingUTF8); CFRelease(cc_app_path); if (*app_path) { - char *n = strrchr(app_path, '/'); - if (n) { -#if defined USING_XCODE - *n = 0; -#endif - chdir(app_path); + if (memcmp(app_path + strlen(app_path) - 4, ".app", 4) == 0) { + char *n = strrchr(app_path, '/'); + if (n) *n = 0; } + chdir(app_path); } char *name = new char[strlen(cmd) + 5];