Skip to content

Commit

Permalink
Merge pull request #15377 from iterate-ch/bugfix/GH-15376
Browse files Browse the repository at this point in the history
Dont verify existance of Downloads-folder
  • Loading branch information
AliveDevil authored Nov 21, 2023
2 parents 06ba772 + f2544c3 commit 445d29a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/src/main/csharp/ch/cyberduck/core/EnvironmentInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//

using System;
using System.IO;
using Windows.Win32.UI.Shell;
using static Windows.Win32.CorePInvoke;

namespace Ch.Cyberduck.Core
Expand All @@ -34,9 +36,16 @@ static EnvironmentInfo()
{
AppDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
CommonAppDataPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
DownloadsPath = SHGetKnownFolderPath(FOLDERID_Downloads, default, default);
LocalAppDataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
UserProfilePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
try
{
DownloadsPath = SHGetKnownFolderPath(FOLDERID_Downloads, KNOWN_FOLDER_FLAG.KF_FLAG_DONT_VERIFY, default);
}
catch
{
DownloadsPath = Path.Combine(UserProfilePath, "Downloads");
}
}
}
}

0 comments on commit 445d29a

Please sign in to comment.