FLTK logo

[master] 1045538 - Fix launching of unbundled app from /tmp

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 1045538 - Fix launching of unbundled app from /tmp "ManoloFLTK" Jan 30, 2023  
 
commit 1045538ed0b1b966f03d4808ff4c907c29e543a3
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Mon Jan 30 20:08:08 2023 +0100
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Mon Jan 30 20:08:18 2023 +0100

    Fix launching of unbundled app from /tmp

 src/Fl_cocoa.mm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git src/Fl_cocoa.mm src/Fl_cocoa.mm
index 9f19589..748f686 100644
--- src/Fl_cocoa.mm
+++ src/Fl_cocoa.mm
@@ -1688,8 +1688,9 @@ static BOOL is_bundled() {
     NSBundle *bundle = [NSBundle mainBundle];
     if (bundle) {
       NSString *exe = [[bundle executablePath] stringByStandardizingPath];
-      NSString *bpath = [bundle bundlePath];
+      NSString *bpath = [[bundle bundlePath] stringByStandardizingPath];
       NSString *exe_dir = [exe stringByDeletingLastPathComponent];
+//NSLog(@"exe=%@ bpath=%@ exe_dir=%@",exe, bpath, exe_dir);
       if ([bpath isEqualToString:exe] || [bpath isEqualToString:exe_dir]) value = 0;
     } else value = 0;
   }
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.