Author: gonzalo
Date: 2006-06-08 17:30:49 -0400 (Thu, 08 Jun 2006)
New Revision: 61590
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: handle access errors when trying to create a folder
or changing to a directory. No need to initialize out parameters.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-06-08 21:21:07 UTC (rev 61589)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-06-08 21:30:49 UTC (rev 61590)
@@ -1,3 +1,8 @@
+2006-06-08 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+ * FileDialog.cs: handle access errors when trying to create a folder
+ or changing to a directory. No need to initialize out parameters.
+
2006-06-08 Alexander Olk <[EMAIL PROTECTED]>
* FileDialog.cs: Append a number when creating a new folder 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 21:21:07 UTC (rev 61589)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs
2006-06-08 21:30:49 UTC (rev 61590)
@@ -2228,8 +2228,14 @@
do_update_view = false;
}
EndUpdate ();
-
- UpdateFileView (folder);
+
+ try {
+ UpdateFileView (folder);
+ } catch (Exception e) {
+ if (should_push)
+ PopDir ();
+ MessageBox.Show (e.Message, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
}
public void UpdateFileView (string folder)
@@ -2761,7 +2767,8 @@
return false;
} else
Directory.CreateDirectory (new_folder);
- } catch (Exception) {
+ } catch (Exception e) {
+ MessageBox.Show (e.Message, new_folder,
MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
@@ -2852,8 +2859,8 @@
directories_out.Add (myNetworkFSEntry);
- ArrayList d_out = new ArrayList ();
- ArrayList f_out = new ArrayList ();
+ ArrayList d_out = null;
+ ArrayList f_out = null;
GetNormalFolderContent
(ThemeEngine.Current.Places (UIIcon.PlacesDesktop), filters, out d_out, out
f_out);
directories_out.AddRange (d_out);
files_out.AddRange (f_out);
@@ -2866,8 +2873,8 @@
directories_out.AddRange (GetMyComputerContent
());
} else
if (currentFolderFSEntry.FullName ==
MWFVFS.PersonalPrefix || currentFolderFSEntry.FullName ==
MWFVFS.MyComputerPersonalPrefix) {
- ArrayList d_out = new ArrayList ();
- ArrayList f_out = new ArrayList ();
+ ArrayList d_out = null;
+ ArrayList f_out = null;
GetNormalFolderContent
(ThemeEngine.Current.Places (UIIcon.PlacesPersonal), filters, out d_out, out
f_out);
directories_out.AddRange (d_out);
files_out.AddRange (f_out);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches