Skip to content

Commit

Permalink
Update BarrelUtils.cs
Browse files Browse the repository at this point in the history
Fixes #142 
Fixes #141
  • Loading branch information
jamesmontemagno authored May 10, 2024
1 parent 5c84d3b commit d4bfc75
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/MonkeyCache/BarrelUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,14 @@ internal static string GetBasePath(string applicationId)
#elif ANDROID
basePath = Application.Context.CacheDir.AbsolutePath;
#elif WINDOWS
basePath = Windows.Storage.ApplicationData.Current.LocalCacheFolder.Path;
try
{
basePath = Windows.Storage.ApplicationData.Current.LocalCacheFolder.Path;
}
catch(Exception ex)
{
basePath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
}
#else
basePath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
#endif
Expand Down

0 comments on commit d4bfc75

Please sign in to comment.