Skip to content

Commit

Permalink
- fixed backup files naming issue on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
firestorm40 committed Sep 6, 2024
1 parent 3dbf55c commit 805c781
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Spixi/Platforms/Windows/SFileOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ public static async Task<Task<bool>> share(string filepath, string title)
CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
try
{
string fileName = Path.GetFileName(filepath);
using FileStream fileStream = File.OpenRead(filepath);
var fileSaverResult = await FileSaver.Default.SaveAsync("Ixian.wal", fileStream, cancellationTokenSource.Token);
var fileSaverResult = await FileSaver.Default.SaveAsync(fileName, fileStream, cancellationTokenSource.Token);
if (!fileSaverResult.IsSuccessful)
{
await Toast.Make($"The file was not saved. Error: {fileSaverResult.Exception.Message}").Show(cancellationTokenSource.Token);
Expand Down

0 comments on commit 805c781

Please sign in to comment.