fix #loadFile: check if file exists
authorMichael Beyl <mb@exept.de>
Fri, 19 Sep 2003 14:57:17 +0200
changeset 5196 13f6e4eaac91
parent 5195 5a2d612e1adb
child 5197 17755f89feab
fix #loadFile: check if file exists
WorkspaceApplication.st
--- a/WorkspaceApplication.st	Fri Sep 19 11:29:19 2003 +0200
+++ b/WorkspaceApplication.st	Fri Sep 19 14:57:17 2003 +0200
@@ -1041,6 +1041,11 @@
     |file ws lbl|
 
     file := aFileName asFilename.
+    file exists ifFalse:[
+        Dialog warn:'File ',file asString,' does not exist'.
+        ^ self
+    ].
+
     (ws := self selectedWorkspacesTextView) contents:file contents.
     ws modified:false.
 
@@ -1628,5 +1633,5 @@
 !WorkspaceApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.64 2003-08-29 19:29:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.65 2003-09-19 12:57:17 mb Exp $'
 ! !