checkin from browser
authorClaus Gittinger <cg@exept.de>
Mon, 17 Mar 1997 18:17:06 +0100
changeset 2454 479b4c4bb05e
parent 2453 603af5a4e0fc
child 2455 c39100c251f9
checkin from browser
Class.st
--- a/Class.st	Mon Mar 17 15:18:07 1997 +0100
+++ b/Class.st	Mon Mar 17 18:17:06 1997 +0100
@@ -4367,47 +4367,48 @@
         moduleString := 'stx'.
         directoryString := libraryString := ''.
         ^ nil
+    ].
+    components size == 1 ifTrue:[
+        "/ a single name given - the module becomes 'stx' or
+        "/ the very first directory component (if such a module exists).
+        "/ If the component includes slashes, its the directory
+        "/ otherwise the library
+        "/ 
+        dirComponents := Filename components:(components at:1).     
+
+        (dirComponents size > 1
+        and:[(mgr := self sourceCodeManager) notNil
+        and:[mgr checkForExistingModule:dirComponents first]]) ifTrue:[
+            moduleString := dirComponents first.
+            directoryString := libraryString := (Filename fromComponents:(dirComponents copyFrom:2)) asString.
+        ] ifFalse:[
+            moduleString := 'stx'.
+            directoryString := libraryString := components at:1.
+        ].
+
+        (libraryString includes:$/) ifTrue:[
+            libraryString := libraryString asFilename baseName
+        ]
     ] ifFalse:[
-        components size == 1 ifTrue:[
-            "/ a single name given - the module becomes 'stx' or
-            "/ the very first directory component (if such a module exists).
-            "/ If the component includes slashes, its the directory
-            "/ otherwise the library
-            "/ 
-            dirComponents := Filename components:(components at:1).     
-            (dirComponents size > 1
-            and:[(mgr := self sourceCodeManager) notNil
-            and:[mgr checkForExistingModule:dirComponents first]]) ifTrue:[
-                moduleString := dirComponents first.
-                directoryString := libraryString := (Filename fromComponents:(dirComponents copyFrom:2)) asString.
-            ] ifFalse:[
-                moduleString := 'stx'.
-                directoryString := libraryString := components at:1.
-            ].
-
+        components size == 2 ifTrue:[
+            "/ two components - assume its the module and the directory; 
+            "/ the library is assumed to be named after the directory
+            "/ except, if slashes are in the name; then the libraryname
+            "/ is the last component.
+            "/
+            moduleString := components at:1.
+            directoryString := libraryString := components at:2.
             (libraryString includes:$/) ifTrue:[
                 libraryString := libraryString asFilename baseName
             ]
         ] ifFalse:[
-            components size == 2 ifTrue:[
-                "/ two components - assume its the module and the directory; 
-                "/ the library is assumed to be named after the directory
-                "/ except, if slashes are in the name; then the libraryname
-                "/ is the last component.
-                "/
-                moduleString := components at:1.
-                directoryString := libraryString := components at:2.
-                (libraryString includes:$/) ifTrue:[
-                    libraryString := libraryString asFilename baseName
-                ]
-            ] ifFalse:[
-                "/ all components given
-                moduleString := components at:1.
-                directoryString := components at:2.
-                libraryString := components at:3.
-            ]
+            "/ all components given
+            moduleString := components at:1.
+            directoryString := components at:2.
+            libraryString := components at:3.
         ]
     ].
+
     libraryString isEmpty ifTrue:[
         directoryString notEmpty ifTrue:[
             libraryString := directoryString asFilename baseName
@@ -4441,7 +4442,7 @@
     "
 
     "Created: 4.11.1995 / 20:36:53 / cg"
-    "Modified: 17.3.1997 / 15:12:32 / cg"
+    "Modified: 17.3.1997 / 18:13:03 / cg"
 !
 
 revision
@@ -4907,6 +4908,6 @@
 !Class class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.259 1997-03-17 14:18:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.260 1997-03-17 17:17:06 cg Exp $'
 ! !
 Class initialize!