Description: Load only GSTest's bundles.
Bug-Debian: https://bugs.debian.org/1076701
Author: Yavor Doganov <yavor@gnu.org>
Forwarded: no
Last-Update: 2025-04-10
---

--- gnustep-examples.orig/gui/GSTest/Controller.m
+++ gnustep-examples/gui/GSTest/Controller.m
@@ -136,16 +136,14 @@
 
   // The test bundles could be in a few places
   bundlePaths = [NSMutableArray arrayWithCapacity: 1];
-  [bundlePaths addObject: [[[NSBundle mainBundle] bundlePath]
-    stringByDeletingLastPathComponent]];
-  stdPaths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
+  [bundlePaths addObject: [[NSBundle mainBundle] bundlePath]];
+  stdPaths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory,
     NSUserDomainMask | NSLocalDomainMask | NSSystemDomainMask, YES);
   enm = [stdPaths objectEnumerator];
   while( (path = [enm nextObject]) )
     {
       [bundlePaths addObject: 
-        [[path stringByAppendingPathComponent: @"ApplicationSupport"]
-        stringByAppendingPathComponent: @"GSTest"]];
+        [path stringByAppendingPathComponent: @"GSTest"]];
     }
 
   // stow away the bundle paths  
