--- a/AbstractSourceCodeManager.st Tue May 03 09:19:20 2016 +0200
+++ b/AbstractSourceCodeManager.st Wed May 04 08:22:14 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
@@ -77,14 +75,23 @@
"JV@2012-03-14: Changed to use .smalltalk/source-cache on UNIX machines"
"CG: why only on unix machines???"
+ |dir|
+
CachingSources isNil ifTrue:[
CachingSources := true.
].
- OperatingSystem isUNIXlike ifTrue:[
- CacheDirectoryName := '~/.smalltalk/sourceCache'.
- ] ifFalse:[
- CacheDirectoryName := (Filename defaultTempDirectory constructString:'stx_sourceCache').
- ].
+
+ dir := Filename homeDirectory / '.smalltalk/sourceCache'.
+ dir isWritableDirectory ifFalse:[
+ dir := Filename defaultTempDirectory / 'stx_sourceCache'.
+ ].
+ CacheDirectoryName := dir pathName.
+
+"/ OperatingSystem isUNIXlike ifTrue:[
+"/ CacheDirectoryName := '~/.smalltalk/sourceCache'.
+"/ ] ifFalse:[
+"/ CacheDirectoryName := (Filename defaultTempDirectory constructString:'stx_sourceCache').
+"/ ].
"
self initCacheDirPath
@@ -2597,12 +2604,12 @@
|versionString|
- versionString := aString copyWithout: $§.
+ versionString := aString copyWithout: $.
^ self ensureKeywordExpansionWith: $$ inVersionMethod:versionString.
"
self ensureDollarsInVersionMethod:'foo ^ ''hello'' '
- self ensureDollarsInVersionMethod:'foo ^ ''§hello§'' '
+ self ensureDollarsInVersionMethod:'foo ^ ''hello'' '
self ensureDollarsInVersionMethod:'foo ^ '' hello '' '
self ensureDollarsInVersionMethod:'foo ^ ''$','Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.228 2009/10/20 09:55:58 fm Exp $'' '
-- errors:
@@ -2689,17 +2696,17 @@
,aCharacter asString ,(aString copyFrom:indexOfLastQuote)
"
- self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''hello'' '
- self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ '' hello '' '
- self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''§Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.218 2009/10/07 12:12:30 fm Exp §'' '
+ self ensureKeywordExpansionWith: $ inVersionMethod: 'foo ^ ''hello'' '
+ self ensureKeywordExpansionWith: $ inVersionMethod: 'foo ^ '' hello '' '
+ self ensureKeywordExpansionWith: $ inVersionMethod: 'foo ^ ''Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.218 2009/10/07 12:12:30 fm Exp '' '
self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''hello'' '
self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ '' hello '' '
self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''$','Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.228 2009/10/20 09:55:58 fm Exp $'' '
-- errors:
- self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''§Head'' '
- self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''Header§'' '
+ self ensureKeywordExpansionWith: $ inVersionMethod: 'foo ^ ''Head'' '
+ self ensureKeywordExpansionWith: $ inVersionMethod: 'foo ^ ''Header'' '
"
!
@@ -2712,23 +2719,23 @@
ensureNoDollarsInVersionMethod:aString
"given the source code of another manager's version method, ensure that it does NOT
- contain dollars and add $§ instead, to avoid that CVS expands keywords in it"
+ contain dollars and add $ instead, to avoid that CVS expands keywords in it"
|versionString|
versionString := aString copyWithout: $$.
- ^ self ensureKeywordExpansionWith: $§ inVersionMethod:versionString.
+ ^ self ensureKeywordExpansionWith: $ inVersionMethod:versionString.
"
self ensureNoDollarsInVersionMethod:'foo ^ ''$','Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.228 2009/10/20 09:55:58 fm Exp $'' '
self ensureNoDollarsInVersionMethod:'foo ^ ''$','Head'' '
self ensureNoDollarsInVersionMethod:'foo ^ ''Header$'' '
- self ensureNoDollarsInVersionMethod:'foo ^ ''§Header§'' '
+ self ensureNoDollarsInVersionMethod:'foo ^ ''Header'' '
-- errors:
- self ensureNoDollarsInVersionMethod:'foo ^ ''§Header'' '
- self ensureNoDollarsInVersionMethod:'foo ^ ''Header§'' '
+ self ensureNoDollarsInVersionMethod:'foo ^ ''Header'' '
+ self ensureNoDollarsInVersionMethod:'foo ^ ''Header'' '
"
!