Skip to content

Commit

Permalink
Merge pull request #143 from jamesmontemagno/jamesmontemagno-patch-1
Browse files Browse the repository at this point in the history
Update BarrelUtils.cs
  • Loading branch information
jamesmontemagno authored May 10, 2024
2 parents 5c84d3b + 3818f93 commit fa90b28
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/MonkeyCache.SQLite/MonkeyCache.SQLite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="sqlite-net-pcl" Version="1.9.141-beta" />
<PackageReference Include="sqlite-net-pcl" Version="1.9.172" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/MonkeyCache.TestApp/MonkeyCache.TestApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<ItemGroup>
<PackageReference Include="LiteDB" Version="5.0.19" />
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
<PackageReference Include="sqlite-net-pcl" Version="1.9.172" />
<PackageReference Include="Xamarin.Forms" Version="2.5.0.122203" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/MonkeyCache.TestsSQLite/MonkeyCache.TestsSQLite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ItemGroup>
<ProjectReference Include="..\MonkeyCache.SQLite\MonkeyCache.SQLite.csproj" />
<!-- update SQLitePCLRaw to get the latest native binaries, ex. to support macOS arm64 -->
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.0.7" />
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.1.2" />
</ItemGroup>

<Import Project="..\MonkeyCache.TestsShared\MonkeyCache.TestsShared.projitems" Label="Shared" />
Expand Down
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 fa90b28

Please sign in to comment.