Author: gonzalo
Date: 2006-06-08 16:14:42 -0400 (Thu, 08 Jun 2006)
New Revision: 61584
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs
Log:
2006-06-08 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* FileDialog.cs: (SetFileName) don't crash if CurrentRealFolder is null.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-06-08 19:54:24 UTC (rev 61583)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-06-08 20:14:42 UTC (rev 61584)
@@ -1,3 +1,7 @@
+2006-06-08 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+ * FileDialog.cs: (SetFileName) don't crash if CurrentRealFolder is null.
+
2006-06-08 Alexander Olk <[EMAIL PROTECTED]>
* FileDialog.cs: When creating a new folder don't crash if the
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs
2006-06-08 19:54:24 UTC (rev 61583)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs
2006-06-08 20:14:42 UTC (rev 61584)
@@ -702,7 +702,11 @@
bool rooted = Path.IsPathRooted (fname);
if (!rooted) {
- if (File.Exists (Path.Combine
(mwfFileView.CurrentRealFolder, fname))) {
+ string dir = mwfFileView.CurrentRealFolder ;
+ if (dir == null) {
+ dir = Environment.CurrentDirectory;
+ }
+ if (File.Exists (Path.Combine (dir, fname))) {
fileNameComboBox.Text = fname;
mwfFileView.SetSelectedIndexTo (fname);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches