mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
[Peek] Open file in Read only (#25945)
* Only open FilStream in read-only mode; Release propertyStore handle after getting the file properties
(cherry picked from commit 3b1481da2c)
* Update calls to PropertyStoreHelper
* Add disposable property store
* Make GetPropertyStoreFromPath return Disposable property store
* correct typo
* correct typo
* Remove nullable in DisposablePropertyStore
* Add property getters
* Remove usued method
* Correct typo
* Correct typo again...
* Update description
This commit is contained in:
@@ -210,7 +210,7 @@ namespace Peek.FilePreviewer.Previewers
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
using FileStream stream = File.OpenRead(Item.Path);
|
||||
using FileStream stream = ReadHelper.OpenReadOnly(Item.Path);
|
||||
|
||||
await Dispatcher.RunOnUiThread(async () =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user