Hi there,
One more little bug on Windows.Forms/FileDialog.cs. If we press side
button Desktop and there is no %HOME%/Desktop directory -- program will be
thrown with exception of no such directory. Here is diff suggestion for
fixing this problem, but may be should change to the root directory in
case of no existing directory. Other ideas?

Index: System.Windows.Forms/FileDialog.cs
===================================================================
--- System.Windows.Forms/FileDialog.cs  (revision 47407)
+++ System.Windows.Forms/FileDialog.cs  (working copy)
@@ -1426,12 +1426,14 @@
                                        else
                                        if ( sender == desktopButton )
                                        {
-                                              
fileDialogPanel.ChangeDirectory( this, Environment.GetFolderPath(
Environment.SpecialFolder.Desktop ) );
+                                               if ( File.Exists(
Environment.GetFolderPath( Environment.SpecialFolder.Desktop ) ) )
+                                                      
fileDialogPanel.ChangeDirectory( this, Environment.GetFolderPath(
Environment.SpecialFolder.Desktop ) );
                                        }
                                        else
                                        if ( sender == homeButton )
                                        {
-                                              
fileDialogPanel.ChangeDirectory( this, Environment.GetFolderPath(
Environment.SpecialFolder.Personal ) );
+                                               if( File.Exists(
Environment.GetFolderPath( Environment.SpecialFolder.Personal ) ) )
+                                                      
fileDialogPanel.ChangeDirectory( this, Environment.GetFolderPath(
Environment.SpecialFolder.Personal ) );
                                        }
                                        else
                                        if ( sender == workplaceButton )


_______________________________________________
Mono-winforms-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

Reply via email to