diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-09-20 01:18:19 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-09-20 01:18:19 +0300 |
commit | 791471a66690b9a48f1b16ce5c304f50a1a75676 (patch) | |
tree | aa26bc3baae17864eab7db13bdddd9d60b1c886d /UVtools.WPF/UserSettings.cs | |
parent | 1e787ba11b0fb80a98872535f29f2b1d853d38a9 (diff) |
Improvements
Diffstat (limited to 'UVtools.WPF/UserSettings.cs')
-rw-r--r-- | UVtools.WPF/UserSettings.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/UVtools.WPF/UserSettings.cs b/UVtools.WPF/UserSettings.cs index efab5d8..730c1d3 100644 --- a/UVtools.WPF/UserSettings.cs +++ b/UVtools.WPF/UserSettings.cs @@ -1452,7 +1452,11 @@ namespace UVtools.WPF { get { - var path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), About.Software); + var folder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + if (string.IsNullOrWhiteSpace(folder)) folder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); + if (string.IsNullOrWhiteSpace(folder)) folder = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData); + if (string.IsNullOrWhiteSpace(folder)) folder = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); + var path = Path.Combine(folder, About.Software); try { if (!Directory.Exists(path)) @@ -1696,6 +1700,8 @@ namespace UVtools.WPF catch (Exception e) { Debug.WriteLine(e.Message); + Console.WriteLine(e.Message); + //File.WriteAllText(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "uvtools.txt"), e.Message); Reset(); } } |