mirror of
https://github.com/n00mkrad/flowframes.git
synced 2026-09-01 19:51:28 +02:00
Avoid exception
This commit is contained in:
@@ -33,7 +33,8 @@ namespace Flowframes.Forms
|
||||
{
|
||||
InterpSettings entry = Program.batchQueue.ElementAt(i);
|
||||
string outFormat = Strings.OutputFormat.Get(entry.outSettings.Format.ToString());
|
||||
string str = $"#{i+1}: {Path.GetFileName(entry.inPath).Trunc(40)} - {entry.inFps.GetFloat()} FPS => {entry.interpFactor}x {entry.ai.NameShort} ({entry.model.Name}) => {outFormat}";
|
||||
string inPath = string.IsNullOrWhiteSpace(entry.inPath) ? "No Path" : Path.GetFileName(entry.inPath).Trunc(40);
|
||||
string str = $"#{i+1}: {inPath} - {entry.inFps.GetFloat()} FPS => {entry.interpFactor}x {entry.ai.NameShort} ({entry.model.Name}) => {outFormat}";
|
||||
taskList.Items.Add(str);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,9 @@ namespace Flowframes.IO
|
||||
|
||||
public static string[] ReadLines(string path)
|
||||
{
|
||||
if (!File.Exists(path))
|
||||
return new string[0];
|
||||
|
||||
List<string> lines = new List<string>();
|
||||
using (var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 0x1000, FileOptions.SequentialScan))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user