Browse Source
Merge pull request #11579 from AvaloniaUI/maxkatz6-patch-1
BclStorageFile.OpenWrite should always override file if it exist
pull/11585/head
Dan Walmsley
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
src/Avalonia.Base/Platform/Storage/FileIO/BclStorageFile.cs
|
|
@ -64,7 +64,8 @@ internal class BclStorageFile : IStorageBookmarkFile |
|
|
|
|
|
|
|
|
public Task<Stream> OpenWriteAsync() |
|
|
public Task<Stream> OpenWriteAsync() |
|
|
{ |
|
|
{ |
|
|
return Task.FromResult<Stream>(FileInfo.OpenWrite()); |
|
|
var stream = new FileStream(FileInfo.FullName, FileMode.Create, FileAccess.Write, FileShare.Write); |
|
|
|
|
|
return Task.FromResult<Stream>(stream); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public virtual Task<string?> SaveBookmarkAsync() |
|
|
public virtual Task<string?> SaveBookmarkAsync() |
|
|
|