diff options
author | Matt Ward <matt.ward@microsoft.com> | 2022-09-20 11:44:21 +0300 |
---|---|---|
committer | Matt Ward <matt.ward@microsoft.com> | 2022-09-20 11:44:21 +0300 |
commit | 647c988599b9c9ca179dfd70a17b23e20006c9c9 (patch) | |
tree | 2398cf583148a6560648b2137e83ac0f76582db9 | |
parent | f653d1b053ed456d38d97b1a701e1023d9b716bf (diff) |
Use Environment.SpecialFolder.UserProfile instead of Personal
Mono and .NET, before .NET 8, would resolve the
System.Environment.SpecialFolder.Personal enum value to the $HOME
directory. In .NET 8 this is changing. The Personal folder will now
refer to $XDG_DOCUMENTS_DIR if set or $HOME/Documents otherwise.
Replace all uses of Environment.SpecialFolder.Personal with
Environment.SpecialFolder.UserProfile so the code behaves as it did
before. UserProfile still maps to $HOME
dotnet/runtime#68610
4 files changed, 4 insertions, 4 deletions
diff --git a/Mono.Addins.Gui/Mono.Addins.Gui/AddinManagerDialog.cs b/Mono.Addins.Gui/Mono.Addins.Gui/AddinManagerDialog.cs index bc69529..29bbec8 100644 --- a/Mono.Addins.Gui/Mono.Addins.Gui/AddinManagerDialog.cs +++ b/Mono.Addins.Gui/Mono.Addins.Gui/AddinManagerDialog.cs @@ -531,7 +531,7 @@ namespace Mono.Addins.Gui if (lastFolder != null) dlg.SetCurrentFolder (lastFolder); else - dlg.SetCurrentFolder (Environment.GetFolderPath (Environment.SpecialFolder.Personal)); + dlg.SetCurrentFolder (Environment.GetFolderPath (Environment.SpecialFolder.UserProfile)); dlg.SelectMultiple = true; Gtk.FileFilter f = new Gtk.FileFilter (); diff --git a/Mono.Addins.Gui/Mono.Addins.Gui/NewSiteDialog.cs b/Mono.Addins.Gui/Mono.Addins.Gui/NewSiteDialog.cs index b10d691..bb3ae2d 100644 --- a/Mono.Addins.Gui/Mono.Addins.Gui/NewSiteDialog.cs +++ b/Mono.Addins.Gui/Mono.Addins.Gui/NewSiteDialog.cs @@ -95,7 +95,7 @@ namespace Mono.Addins.Gui dlg.AddButton (Gtk.Stock.Cancel, Gtk.ResponseType.Cancel); dlg.AddButton (Gtk.Stock.Open, Gtk.ResponseType.Ok); - dlg.SetFilename (Environment.GetFolderPath (Environment.SpecialFolder.Personal)); + dlg.SetFilename (Environment.GetFolderPath (Environment.SpecialFolder.UserProfile)); if (dlg.Run () == (int) ResponseType.Ok) { pathEntry.Text = dlg.Filename; } diff --git a/Mono.Addins.GuiGtk3/Mono.Addins.Gui/AddinManagerDialog.cs b/Mono.Addins.GuiGtk3/Mono.Addins.Gui/AddinManagerDialog.cs index ed1d564..e0e5aab 100644 --- a/Mono.Addins.GuiGtk3/Mono.Addins.Gui/AddinManagerDialog.cs +++ b/Mono.Addins.GuiGtk3/Mono.Addins.Gui/AddinManagerDialog.cs @@ -584,7 +584,7 @@ namespace Mono.Addins.GuiGtk3 if (lastFolder != null) dlg.SetCurrentFolder (lastFolder); else - dlg.SetCurrentFolder (Environment.GetFolderPath (Environment.SpecialFolder.Personal)); + dlg.SetCurrentFolder (Environment.GetFolderPath (Environment.SpecialFolder.UserProfile)); dlg.SelectMultiple = true; Gtk.FileFilter f = new Gtk.FileFilter (); diff --git a/Mono.Addins.GuiGtk3/Mono.Addins.Gui/NewSiteDialog.cs b/Mono.Addins.GuiGtk3/Mono.Addins.Gui/NewSiteDialog.cs index db65ec8..5de4c03 100644 --- a/Mono.Addins.GuiGtk3/Mono.Addins.Gui/NewSiteDialog.cs +++ b/Mono.Addins.GuiGtk3/Mono.Addins.Gui/NewSiteDialog.cs @@ -113,7 +113,7 @@ namespace Mono.Addins.GuiGtk3 dlg.AddButton (Gtk.Stock.Cancel, Gtk.ResponseType.Cancel); dlg.AddButton (Gtk.Stock.Open, Gtk.ResponseType.Ok); - dlg.SetFilename (Environment.GetFolderPath (Environment.SpecialFolder.Personal)); + dlg.SetFilename (Environment.GetFolderPath (Environment.SpecialFolder.UserProfile)); if (dlg.Run () == (int) ResponseType.Ok) { pathEntry.Text = dlg.Filename; } |