mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[GUI] Update SaveFilePickerAsync method in DvdWritableInfoViewModel to use asynchronous file writing
This commit is contained in:
@@ -243,16 +243,13 @@ public sealed class DvdWritableInfoViewModel
|
|||||||
{
|
{
|
||||||
IStorageFile result = await _view.StorageProvider.SaveFilePickerAsync(new FilePickerSaveOptions
|
IStorageFile result = await _view.StorageProvider.SaveFilePickerAsync(new FilePickerSaveOptions
|
||||||
{
|
{
|
||||||
FileTypeChoices = new List<FilePickerFileType>
|
FileTypeChoices = [FilePickerFileTypes.Binary]
|
||||||
{
|
|
||||||
FilePickerFileTypes.Binary
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if(result is null) return;
|
if(result is null) return;
|
||||||
|
|
||||||
var saveFs = new FileStream(result.Path.AbsolutePath, FileMode.Create);
|
var saveFs = new FileStream(result.Path.AbsolutePath, FileMode.Create);
|
||||||
saveFs.Write(data, 0, data.Length);
|
await saveFs.WriteAsync(data, 0, data.Length);
|
||||||
|
|
||||||
saveFs.Close();
|
saveFs.Close();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user