Make file dialog API usages read-only (#37779)
Requires 4e7de2f272
Fixes #37762
This commit is contained in:
committed by
GitHub
parent
21a29212ab
commit
52430df55f
@@ -40,7 +40,7 @@ public sealed class FaxBoundUi : BoundUserInterface
|
||||
|
||||
_dialogIsOpen = true;
|
||||
var filters = new FileDialogFilters(new FileDialogFilters.Group("txt"));
|
||||
await using var file = await _fileDialogManager.OpenFile(filters);
|
||||
await using var file = await _fileDialogManager.OpenFile(filters, FileAccess.Read);
|
||||
_dialogIsOpen = false;
|
||||
|
||||
if (_window == null || _window.Disposed || file == null)
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace Content.Client.Instruments.UI
|
||||
// or focus the previously-opened window.
|
||||
_isMidiFileDialogueWindowOpen = true;
|
||||
|
||||
await using var file = await _dialogs.OpenFile(filters);
|
||||
await using var file = await _dialogs.OpenFile(filters, FileAccess.Read);
|
||||
|
||||
_isMidiFileDialogueWindowOpen = false;
|
||||
|
||||
|
||||
@@ -1531,7 +1531,7 @@ namespace Content.Client.Lobby.UI
|
||||
return;
|
||||
|
||||
StartExport();
|
||||
await using var file = await _dialogManager.OpenFile(new FileDialogFilters(new FileDialogFilters.Group("yml")));
|
||||
await using var file = await _dialogManager.OpenFile(new FileDialogFilters(new FileDialogFilters.Group("yml")), FileAccess.Read);
|
||||
|
||||
if (file == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user