#BUGFIX by stefan
class: Filename class
changed: #applicationDataDirectoryFor:
same again
--- a/Filename.st Wed Jan 16 14:24:36 2019 +0100
+++ b/Filename.st Wed Jan 16 14:30:50 2019 +0100
@@ -306,7 +306,7 @@
is returned, under unix, we use ~/.<appName> (but see details in UnixOS).
If the directory does not exist, it is created"
- |s dir again|
+ |s dir firstTime|
s := OperatingSystem getApplicationDataDirectoryFor:appName.
s isNil ifTrue:[
@@ -314,14 +314,18 @@
].
dir := self named:s.
dir isWritableDirectory ifFalse:[
- again := false.
+ firstTime := true.
[
dir makeDirectory.
] on:OsError do:[:ex|
- again ifFalse:[
- again := true.
+ firstTime ifTrue:[
+ firstTime := false.
dir := self tempDirectory / appName.
- ex restart.
+ dir isWritableDirectory ifFalse:[
+ ex restart.
+ ].
+ ] ifFalse:[
+ ex reject.
].
].
].
@@ -333,7 +337,7 @@
"
"Created: / 29-07-2010 / 12:05:35 / sr"
- "Modified: / 16-01-2019 / 14:23:10 / Stefan Vogel"
+ "Modified: / 16-01-2019 / 14:29:59 / Stefan Vogel"
!
currentDirectory