mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 20:04:13 +08:00
(LoadPreviewText): previewed stream should be seekable.
This commit is contained in:
parent
b5fa9cc105
commit
83aafca437
@ -209,9 +209,16 @@ namespace GARbro.GUI
|
||||
try
|
||||
{
|
||||
file = OpenPreviewStream (preview);
|
||||
if (!file.CanSeek)
|
||||
{
|
||||
var memory = new MemoryStream();
|
||||
file.CopyTo (memory);
|
||||
file.Dispose();
|
||||
file = memory;
|
||||
}
|
||||
if (!TextView.IsTextFile (file))
|
||||
{
|
||||
ActiveViewer = ImageView;
|
||||
ResetPreviewPane();
|
||||
return;
|
||||
}
|
||||
var enc = EncodingChoice.SelectedItem as Encoding;
|
||||
|
Loading…
x
Reference in New Issue
Block a user