class: STCCompilerInterface
authorClaus Gittinger <cg@exept.de>
Sat, 08 Aug 2015 04:49:21 +0200
changeset 3664 646ce5a13d24
parent 3662 56bf5e42eea3
child 3665 945581b55c30
child 3668 6a2bb2c53ee4
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)
STCCompilerInterface.st
--- 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:[