#BUGFIX by cg
authorClaus Gittinger <cg@exept.de>
Wed, 07 Nov 2018 17:26:40 +0100
changeset 23516 615475ef5504
parent 23515 021c8bca5ab8
child 23517 a28496b2a7a3
#BUGFIX by cg class: ProjectDefinition class changed: #pathToPackage:from:withSeparator: fix ../ relative path (expecco/application -> expecco)
ProjectDefinition.st
--- a/ProjectDefinition.st	Wed Nov 07 08:21:21 2018 +0100
+++ b/ProjectDefinition.st	Wed Nov 07 17:26:40 2018 +0100
@@ -710,15 +710,21 @@
     parts2 := toPackageID asCollectionOfSubstringsSeparatedByAny:':/'.
     common := parts1 commonPrefixWith:parts2.
     common notEmpty ifTrue:[
-	up := ((1 to:parts1 size - common size) collect:[:p | oneUp]) asStringWith:''.
-	down := (parts2 copyFrom:common size+1) asStringWith:pathSeparator.
-	(up isEmpty and:[down isEmpty]) ifTrue:[^ '.'].
-	^ up , down
+        up := ((1 to:parts1 size - common size) collect:[:p | oneUp]) asStringWith:''.
+        down := (parts2 copyFrom:common size+1) asStringWith:pathSeparator.
+        (up isEmpty and:[down isEmpty]) ifTrue:[^ '.'].
+        (up endsWith:'/') ifTrue:[
+            down isEmpty ifTrue:[^ up copyButLast]
+        ].
+        (up isEmpty) ifTrue:[
+            (down startsWith:'/') ifTrue:[^ down copyButFirst]
+        ].
+        ^ up , down
     ].
 
     rel := (self topRelativePathToPackage:toPackageID withSeparator:pathSeparator).
     (rel startsWith:('stx', pathSeparator)) ifTrue:[
-	^ '$(TOP)', (rel copyFrom:'stx/' size) "/ notice: the separator remains
+        ^ '$(TOP)', (rel copyFrom:'stx/' size) "/ notice: the separator remains
     ].
 
     ^ '$(TOP)', pathSeparator, oneUp, rel.
@@ -727,9 +733,12 @@
      self pathToPackage:'bosch:dapasx/kernel' from:'bosch:dapasx/application' withSeparator:'\'
      self pathToPackage:'stx:libbasic' from:'bosch:dapasx/application' withSeparator:'\'
      self pathToPackage:'bosch:dapasx/application' from:'stx:libbasic' withSeparator:'\'
+     exept_expecco_application pathToPackage:'exept:expecco' from:'exept:expecco/application' withSeparator:'/'
+     exept_expecco_application pathToPackage:'exept:expecco/plugins/guiBrowser' from:'exept:expecco/application' withSeparator:'/'
     "
 
     "Created: / 14-09-2006 / 15:21:10 / cg"
+    "Modified: / 07-11-2018 / 17:24:26 / Claus Gittinger"
 !
 
 pathToPackage:aPackageID withSeparator:pathSeparator