Skip to content

Commit 4f857fd

Browse files
author
David Khristepher Santos
committed
Fileshare read on load preview
1 parent 6046618 commit 4f857fd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Diffusion.Toolkit/Pages/Search.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ public Search() : base("search")
327327

328328
_model.OpenCommand = new RelayCommand<object>(async (o) =>
329329
{
330-
if (_currentModeSettings.ViewMode == ViewMode.Folder &&
330+
if (_currentModeSettings.ViewMode == ViewMode.Folder &&
331331
(_model.SelectedImageEntry.EntryType is EntryType.Folder or EntryType.RootFolder))
332332
{
333333
_model.FolderPath = _model.SelectedImageEntry.Path;
@@ -1191,7 +1191,7 @@ public void LoadPreviewImage(string path, ImageEntry? image = null, bool updateV
11911191
public static BitmapImage GetBitmapImage(string path)
11921192
{
11931193
BitmapImage bitmap;
1194-
using var stream = new FileStream(path, FileMode.Open, FileAccess.Read);
1194+
using var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read);
11951195
{
11961196
bitmap = new BitmapImage();
11971197
bitmap.BeginInit();
@@ -1582,7 +1582,7 @@ private void LoadImageEntries()
15821582
dest.Dispatcher = Dispatcher;
15831583
dest.Thumbnail = null;
15841584
dest.IsEmpty = false;
1585-
1585+
15861586

15871587
dest.IsRecursive = false;
15881588
dest.IsWatched = false;

0 commit comments

Comments
 (0)