class: STCCompilerInterface
changed: #ensureModuleDirectoryExists
better error message
(in case modules dir is not writable,
which may happen if st/x was previously executed
as root in the same directory)
--- a/STCCompilerInterface.st Thu Jul 23 13:24:17 2015 +0200
+++ b/STCCompilerInterface.st Sat Aug 08 04:49:21 2015 +0200
@@ -628,7 +628,7 @@
!
ensureModuleDirectoryExists
- |mP t|
+ |mP t msg|
mP := parserFlags stcModulePath.
mP isEmptyOrNil ifTrue:[
@@ -639,8 +639,14 @@
mP makeDirectory
].
(mP isWritableDirectory and:[mP isReadable]) ifFalse:[
- self parseError:('No access to temporary module directory: ' , mP pathName) position:1.
+ (mP exists and:[mP isDirectory]) ifTrue:[
+ msg := 'No write permission in temporary module directory: '.
+ ] ifFalse:[
+ msg := 'No access to temporary module directory: '.
+ ].
+ self parseError:(msg , mP pathName) position:1.
].
+
"/ create a small README there ...
(t := mP construct:'README') exists ifFalse:[