]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/os-macosx.mm
vm: setting current directory when launching Factor.app
[factor.git] / vm / os-macosx.mm
index 6583ce8720158c9e0e1024df1503ba4c13ee4bc6..4f1944a90c9f0dbae89482fcdff122bac931e854 100644 (file)
@@ -39,6 +39,9 @@ const char* default_image_path(void) {
   if ([path hasSuffix:@".app"] || [path hasSuffix:@".app/"]) {
     NSFileManager* mgr = [NSFileManager defaultManager];
 
+    NSString* root = [path stringByDeletingLastPathComponent];
+    [mgr changeCurrentDirectoryPath: root];
+
     NSString* imageInBundle =
         [[path stringByAppendingPathComponent:@"Contents/Resources"]
             stringByAppendingPathComponent:image];