--- a/AbstractOperatingSystem.st Sat Dec 15 09:40:48 2012 +0000
+++ b/AbstractOperatingSystem.st Sun Dec 16 00:20:16 2012 +0000
@@ -4110,6 +4110,14 @@
!AbstractOperatingSystem class methodsFor:'path queries'!
+decodePath:encodedPathName
+ "decode the pathName as returned by system calls.
+ E.g. linux system calls return sigle byte strings only,
+ so the pathName has been UTF-8 decoded."
+
+ ^ encodedPathName
+!
+
defaultPackagePath
"return a default packagePath - thats a collection of
dirnames, where ST/X searches for its package subdirs.
@@ -4246,17 +4254,17 @@
"/
appPath := self pathOfSTXExecutable.
appPath notNil ifTrue:[
- appDir := appPath asFilename directory.
- appPath := appDir pathName.
- (sysPath includes:appPath) ifFalse:[
- sysPath add:appPath.
- ].
- appDir baseName = 'bin' ifTrue:[
- appPath := appDir directory pathName.
- (sysPath includes:appPath) ifFalse:[
- sysPath add:appPath.
- ].
- ].
+ appDir := appPath asFilename directory.
+ appPath := appDir pathName.
+ (sysPath includes:appPath) ifFalse:[
+ sysPath add:appPath.
+ ].
+ appDir baseName = 'bin' ifTrue:[
+ appPath := appDir directory pathName.
+ (sysPath includes:appPath) ifFalse:[
+ sysPath add:appPath.
+ ].
+ ].
].
"/
@@ -4264,48 +4272,56 @@
"/
homePath := self getHomeDirectory.
homePath notNil ifTrue:[
- "/
- "/ a users private smalltalk directory in its home (login) directory
- "/
- OperatingSystem isUNIXlike ifTrue:[
- priv := '.smalltalk'.
- ] ifFalse:[
- priv := 'smalltalk'.
- ].
- userPrivateSTXDir := homePath asFilename construct:priv.
- (userPrivateSTXDir isDirectory) ifTrue:[
- userPrivateSTXDir := userPrivateSTXDir pathName.
- (sysPath includes:userPrivateSTXDir) ifFalse:[
- sysPath add:userPrivateSTXDir
- ]
- ].
+ "/
+ "/ a users private smalltalk directory in its home (login) directory
+ "/
+ OperatingSystem isUNIXlike ifTrue:[
+ priv := '.smalltalk'.
+ ] ifFalse:[
+ priv := 'smalltalk'.
+ ].
+ userPrivateSTXDir := homePath asFilename construct:priv.
+ (userPrivateSTXDir isDirectory) ifTrue:[
+ userPrivateSTXDir := userPrivateSTXDir pathName.
+ (sysPath includes:userPrivateSTXDir) ifFalse:[
+ sysPath add:userPrivateSTXDir
+ ]
+ ].
].
"/
"/ SMALLTALK_LIBDIR, STX_LIBDIR and STX_TOPDIR from the environment
"/
#(
- 'SMALLTALK_LIBDIR'
- 'STX_LIBDIR'
- 'STX_TOPDIR'
+ 'SMALLTALK_LIBDIR'
+ 'STX_LIBDIR'
+ 'STX_TOPDIR'
) do:[:each |
- p := OperatingSystem getEnvironment:each.
- p notNil ifTrue:[
- p := p asFilename pathName.
- (p asFilename isDirectory) ifTrue:[
- (sysPath includes:p) ifFalse:[
- sysPath add:p
- ]
- ]
- ].
+ p := OperatingSystem decodePath:(OperatingSystem getEnvironment:each).
+ p notNil ifTrue:[
+ p := p asFilename pathName.
+ (p asFilename isDirectory) ifTrue:[
+ (sysPath includes:p) ifFalse:[
+ sysPath add:p
+ ]
+ ]
+ ].
].
^ sysPath
"
- OperatingSystem defaultSystemPath
+ OperatingSystem defaultSystemPath
"
"Modified: / 24.12.1999 / 00:30:27 / cg"
+!
+
+encodePath:pathName
+ "encode the pathName for use with system calls.
+ E.g. linux system calls accept sigle byte strings only,
+ so the pathName has been UTF-8 encoded, before using it in a system call."
+
+ ^ pathName
! !
!AbstractOperatingSystem class methodsFor:'printing support'!
@@ -7130,21 +7146,11 @@
!AbstractOperatingSystem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.220 2012/01/23 13:08:04 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.222 2012/12/13 13:52:25 stefan Exp $'
!
version_CVS
- ^ 'Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.220 2012/01/23 13:08:04 cg Exp '
-!
-
-version_SVN
- ^ '$Id: AbstractOperatingSystem.st 10777 2012-02-13 19:19:41Z vranyj1 $'
+ ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.222 2012/12/13 13:52:25 stefan Exp $'
! !
AbstractOperatingSystem initialize!
-
-
-
-
-
-