Do not try to file-in directory when loading patches
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 15 Aug 2012 19:31:35 +0200
changeset 1252 688c919be522
parent 1251 9136af3a750d
child 1253 c4fe978d8015
Do not try to file-in directory when loading patches
patches
--- a/patches	Tue Aug 14 10:54:14 2012 +0200
+++ b/patches	Wed Aug 15 19:31:35 2012 +0200
@@ -37,11 +37,16 @@
 	patchDir := patchDirOrNil asFilename.
 	(patchDir exists and:[patchDir isDirectory and:[patchDir isReadable]]) ifTrue:[
 	    patchDir directoryContents sort do:[:f |
-		|fn|
+		|file fn|
 
-		fn := (patchDir construct:f) name.
-		Smalltalk splashInfo:('patches [info]: reading patchFile ''' , fn , '''...').
-		Smalltalk fileIn:fn.
+		fn := (file := patchDir construct:f) name.
+                "JV@2012-08-15: File in only if file is not a directory. Otherwise system
+                 crashes during startup, if one of the patch directories contains another directory
+                 (such as CVS)"
+                (file isDirectory not and:[file isReadable]) ifTrue:[
+		    Smalltalk splashInfo:('patches [info]: reading patchFile ''' , fn , '''...').
+		    Smalltalk fileIn:fn.
+                ]
 	    ]
 	]
     ].