mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-14 20:29:07 +00:00
Fix the same previous issue in other plugins
This commit is contained in:
@@ -69,9 +69,9 @@ public class Plugin : IViewer
|
||||
if (path.EndsWith(".rtf", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var rtfBox = new RichTextBox();
|
||||
using FileStream fs = File.OpenRead(path);
|
||||
using var fileStream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
|
||||
rtfBox.Background = new SolidColorBrush(Colors.Transparent);
|
||||
rtfBox.Selection.Load(fs, DataFormats.Rtf);
|
||||
rtfBox.Selection.Load(fileStream, DataFormats.Rtf);
|
||||
rtfBox.IsReadOnly = true;
|
||||
rtfBox.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
|
||||
rtfBox.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
|
||||
|
@@ -187,8 +187,8 @@ public class HighlightingThemeManager
|
||||
{
|
||||
Debug.WriteLine(file);
|
||||
var ext = Path.GetFileNameWithoutExtension(file);
|
||||
using Stream s = File.OpenRead(Path.GetFullPath(file));
|
||||
using var reader = new XmlTextReader(s);
|
||||
using var fileStream = new FileStream(Path.GetFullPath(file), FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
|
||||
using var reader = new XmlTextReader(fileStream);
|
||||
var xshd = HighlightingLoader.LoadXshd(reader);
|
||||
var highlightingDefinition = HighlightingLoader.Load(xshd, hlm);
|
||||
if (xshd.Extensions.Count > 0)
|
||||
|
Reference in New Issue
Block a user