Smalltalk.st
changeset 23446 994a3426acdb
parent 23445 2f2ca1a7aaac
child 23448 c3a10c2e07a4
--- a/Smalltalk.st	Sun Oct 14 22:40:22 2018 +0200
+++ b/Smalltalk.st	Sun Oct 14 22:55:53 2018 +0200
@@ -7562,15 +7562,14 @@
     pF notNil ifTrue:[
         ^ pF.
     ].
-    pF := self searchPath:(self realSystemPath) for:aFileName in:('.resources/',packageDir,'/bitmaps').
-    pF notNil ifTrue:[
-        ^ pF.
-    ].
-    pF := self searchPath:(self realSystemPath) for:aFileName in:('resources/',packageDir,'/bitmaps').
-    pF notNil ifTrue:[
-        ^ pF.
-    ].
-
+    #('../Resources' '.resources' 'resources') do:[:eachPossibleRsrcDir |
+        pF := self searchPath:(self realSystemPath) 
+                   for:aFileName 
+                   in:(eachPossibleRsrcDir,'/',packageDir,'/bitmaps').
+        pF notNil ifTrue:[
+            ^ pF.
+        ].
+    ].
     ^ nil
 
     "
@@ -7744,26 +7743,27 @@
 "/        'Smalltalk [warning]: resource file access without package: ' infoPrint. aFileName infoPrintCR.
 "/        self halt.
 
-        pF := self searchPath:(self realSystemPath) for:aFileName in:('.resources').
-        pF notNil ifTrue:[
-            ^ pF.
+        #('../Resources' '.resources' 'resources') do:[:eachPossibleRsrcDir |
+            pF := self searchPath:(self realSystemPath) 
+                       for:aFileName 
+                       in:(eachPossibleRsrcDir).
+            pF notNil ifTrue:[
+                ^ pF.
+            ].
         ].
-        pF := self searchPath:(self realSystemPath) for:aFileName in:('resources').
-        pF notNil ifTrue:[
-            ^ pF.
-        ].
+
 "/        pF := self searchPath:(self realSystemPath) for:aFileName in:('resources/styles').
 "/        pF notNil ifTrue:[
 "/            ^ pF.
 "/        ].
         f ~= aFileName ifTrue:[
-            pF := self searchPath:(self realSystemPath) for:f in:('.resources').
-            pF notNil ifTrue:[
-                ^ pF.
-            ].
-            pF := self searchPath:(self realSystemPath) for:f in:('resources').
-            pF notNil ifTrue:[
-                ^ pF.
+            #('../Resources' '.resources' 'resources') do:[:eachPossibleRsrcDir |
+                pF := self searchPath:(self realSystemPath) 
+                           for:f 
+                           in:(eachPossibleRsrcDir).
+                pF notNil ifTrue:[
+                    ^ pF.
+                ].
             ].
 "/            pF := self searchPath:(self realSystemPath) for:f in:('resources/styles').
 "/            pF notNil ifTrue:[
@@ -7775,13 +7775,13 @@
 
     packageDir := aPackageIDOrNil copyReplaceAll:$: with:$/.
 
-    pF := self searchPath:(self realSystemPath) for:aFileName in:('.resources/',packageDir).
-    pF notNil ifTrue:[
-        ^ pF.
-    ].
-    pF := self searchPath:(self realSystemPath) for:aFileName in:('resources/',packageDir).
-    pF notNil ifTrue:[
-        ^ pF.
+    #('../Resources' '.resources' 'resources') do:[:eachPossibleRsrcDir |
+        pF := self searchPath:(self realSystemPath) 
+                   for:aFileName 
+                   in:(eachPossibleRsrcDir,'/',packageDir).
+        pF notNil ifTrue:[
+            ^ pF.
+        ].
     ].
 
     "/ the following code finds the file within the IDE's own hierarchy