From 7758845076413a69dda979e5e2cee233d982966f Mon Sep 17 00:00:00 2001
From: d2dyno006 <53011783+d2dyno006@users.noreply.github.com>
Date: Tue, 8 Oct 2024 21:00:48 +0200
Subject: [PATCH] Simplify project file
---
src/Platforms/Directory.Packages.props | 2 +-
.../SecureFolderFS.Uno/Package.appxmanifest | 2 +-
.../SecureFolderFS.Uno.csproj | 45 ++++++-------------
.../AppModels/V1_V2/MigratorV1_V2.cs | 13 ++++++
4 files changed, 29 insertions(+), 33 deletions(-)
diff --git a/src/Platforms/Directory.Packages.props b/src/Platforms/Directory.Packages.props
index b2b22fad..b41f0b9b 100644
--- a/src/Platforms/Directory.Packages.props
+++ b/src/Platforms/Directory.Packages.props
@@ -30,7 +30,7 @@
-
+
diff --git a/src/Platforms/SecureFolderFS.Uno/Package.appxmanifest b/src/Platforms/SecureFolderFS.Uno/Package.appxmanifest
index b804059b..5eb1e3d1 100644
--- a/src/Platforms/SecureFolderFS.Uno/Package.appxmanifest
+++ b/src/Platforms/SecureFolderFS.Uno/Package.appxmanifest
@@ -14,7 +14,7 @@
SecureFolderFS
d2dyno
- Assets\PackageLogo.png
+ Assets\AppIcon\PackageLogo.png
diff --git a/src/Platforms/SecureFolderFS.Uno/SecureFolderFS.Uno.csproj b/src/Platforms/SecureFolderFS.Uno/SecureFolderFS.Uno.csproj
index 20910deb..9cc2cd78 100644
--- a/src/Platforms/SecureFolderFS.Uno/SecureFolderFS.Uno.csproj
+++ b/src/Platforms/SecureFolderFS.Uno/SecureFolderFS.Uno.csproj
@@ -9,10 +9,10 @@
+
-
-
+
Exe
true
@@ -25,31 +25,6 @@
1.0
1
com.securefolderfs.SecureFolderFS
-
-
-
-
-
-
- OpenSans;
-
-
-
-
-
-
@@ -128,14 +103,23 @@
win-x86;win-x64;win-arm64
$(DotNetVersion)-windows10.0.19041.0
win-$(Platform).pubxml
+
+ Never
+
+ x86|x64|arm64
False
True
- False
- Always
- x86|x64|arm64
+ False
+
True
+ False
+
+
+
+ 10.0.22621.3233
+ 4.2.2
Language=en-US;pl-PL;de-DE;es-ES;da-DK;uk-UA;pt-PT;ms-MY;id-ID;hi-IN
@@ -222,7 +206,6 @@
-
diff --git a/src/SecureFolderFS.Core.Migration/AppModels/V1_V2/MigratorV1_V2.cs b/src/SecureFolderFS.Core.Migration/AppModels/V1_V2/MigratorV1_V2.cs
index 2dfde92c..5811ae93 100644
--- a/src/SecureFolderFS.Core.Migration/AppModels/V1_V2/MigratorV1_V2.cs
+++ b/src/SecureFolderFS.Core.Migration/AppModels/V1_V2/MigratorV1_V2.cs
@@ -96,6 +96,7 @@ public async Task MigrateAsync(IDisposable unlockContract, ProgressModel progres
// Create backup
await CreateConfigBackup(configStream, cancellationToken);
+ await CreateKeystoreBackup(cancellationToken);
await using var serializedStream = await _streamSerializer.SerializeAsync(v2ConfigDataModel, cancellationToken);
await serializedStream.CopyToAsync(configStream, cancellationToken);
@@ -117,6 +118,18 @@ private async Task CreateConfigBackup(Stream configStream, CancellationToken can
configStream.Position = 0L;
}
+ private async Task CreateKeystoreBackup(CancellationToken cancellationToken)
+ {
+ if (VaultFolder is not IModifiableFolder modifiableFolder)
+ return;
+
+ var keystoreFile = await VaultFolder.GetFileByNameAsync(Constants.Vault.Names.VAULT_KEYSTORE_FILENAME, cancellationToken);
+ var backupKeystoreName = $"{Constants.Vault.Names.VAULT_KEYSTORE_FILENAME}.bkup";
+ var backupKeystoreFile = await modifiableFolder.CreateFileAsync(backupKeystoreName, true, cancellationToken);
+
+ await keystoreFile.CopyContentsToAsync(backupKeystoreFile, cancellationToken);
+ }
+
private static string GetContentCipherId(int v1ContentCipherScheme)
{
return v1ContentCipherScheme switch