diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml
index 591e3b8..1b988ca 100644
--- a/.github/workflows/prepare-release.yml
+++ b/.github/workflows/prepare-release.yml
@@ -34,7 +34,7 @@ jobs:
-
${{ steps.ver.outputs.version }}
https://github.com/${{ github.repository }}/releases/download/${{ steps.ver.outputs.version }}/NebulaAuth.${{ steps.ver.outputs.version }}.zip
- https://achiez.github.io/${{ github.repository }}/changelog/${{ steps.ver.outputs.version }}.html
+ https://achiez.github.io/${{ github.event.repository.name }}/changelog/${{ steps.ver.outputs.version }}.html
false
EOF
@@ -62,4 +62,4 @@ jobs:
- name: Skip message
if: steps.diff.outputs.no_changes == 'true'
- run: echo "No changes in version or update.xml — skipping release preparation."
+ run: echo "No changes in version or update.xml - skipping release preparation."
diff --git a/src/NebulaAuth/Model/Mafiles/MafilesStorageHelper.cs b/src/NebulaAuth/Model/Mafiles/MafilesStorageHelper.cs
index 6d50750..bda9e96 100644
--- a/src/NebulaAuth/Model/Mafiles/MafilesStorageHelper.cs
+++ b/src/NebulaAuth/Model/Mafiles/MafilesStorageHelper.cs
@@ -1,12 +1,12 @@
-using System.IO;
-using NebulaAuth.Model.Entities;
+using NebulaAuth.Model.Entities;
+using System.IO;
namespace NebulaAuth.Model.Mafiles;
internal static class MafilesStorageHelper
{
///
- /// Returns or creates a new one and updates the property.
+ /// Returns or creates a new one and updates the property. is always not after this method call.
///
///
///
diff --git a/src/NebulaAuth/Model/Mafiles/Storage.cs b/src/NebulaAuth/Model/Mafiles/Storage.cs
index 8997344..ce64835 100644
--- a/src/NebulaAuth/Model/Mafiles/Storage.cs
+++ b/src/NebulaAuth/Model/Mafiles/Storage.cs
@@ -148,13 +148,15 @@ public static class Storage
public static void MoveToRemoved(Mafile data)
{
var sourcePath = MafilesStorageHelper.GetOrUpdateMafilePath(data);
- var destinationPath = Path.Combine(DIR_REMOVED_MAFILES, data.Filename + ".mafile");
- var destinationPathFinal = destinationPath;
+ var fileName = Path.GetFileNameWithoutExtension(data.Filename!);
+ var destinationPathBase = Path.Combine(DIR_REMOVED_MAFILES, fileName);
+ var destinationPathFinal = Path.ChangeExtension(destinationPathBase, MafileNamingStrategy.DEF_EXTENSION);
var i = 0;
while (File.Exists(destinationPathFinal))
{
i++;
- destinationPathFinal = destinationPath + $" ({i})";
+ destinationPathFinal = destinationPathBase + $" ({i})";
+ destinationPathFinal = Path.ChangeExtension(destinationPathFinal, MafileNamingStrategy.DEF_EXTENSION);
}
File.Copy(sourcePath, destinationPathFinal, false);
diff --git a/src/NebulaAuth/ViewModel/MainVM.cs b/src/NebulaAuth/ViewModel/MainVM.cs
index 2bcd1da..94e7ffa 100644
--- a/src/NebulaAuth/ViewModel/MainVM.cs
+++ b/src/NebulaAuth/ViewModel/MainVM.cs
@@ -33,7 +33,7 @@ public partial class MainVM : ObservableObject
public bool IsMafileSelected => SelectedMafile != null;
public DialogHost CurrentDialogHost { get; set; } = null!;
- [ObservableProperty] private ObservableCollection _maFiles = Storage.MaFiles;
+ [ObservableProperty] private ObservableCollection _maFiles = new(Storage.MaFiles);
private Mafile? _selectedMafile;
@@ -115,7 +115,7 @@ public partial class MainVM : ObservableObject
private void MaFilesOnCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
{
- SearchText = string.Empty;
+ PerformQuery();
}
@@ -173,7 +173,6 @@ public partial class MainVM : ObservableObject
if (result.Success)
{
Storage.MoveToRemoved(selectedMafile);
- MaFiles.Remove(selectedMafile);
}
}
else
diff --git a/src/NebulaAuth/ViewModel/Other/SettingsVM.cs b/src/NebulaAuth/ViewModel/Other/SettingsVM.cs
index dd6dbbd..eb1daa8 100644
--- a/src/NebulaAuth/ViewModel/Other/SettingsVM.cs
+++ b/src/NebulaAuth/ViewModel/Other/SettingsVM.cs
@@ -86,7 +86,7 @@ public partial class SettingsVM : ObservableObject
{
var l = GetLoc("PartialSuccess");
RenameResultText =
- string.Format(l, result.Total, result.Renamed, result.Errors, result.Conflict, result.BackupFileName);
+ string.Format(l, result.Total, result.Renamed, result.Conflict, result.Errors, result.BackupFileName);
}
string GetLoc(string key)