mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-25 12:49:26 +01:00
Do not allow UNC paths for compat reasons, show warnings
This commit is contained in:
@@ -36,7 +36,7 @@ namespace Flowframes
|
||||
canceled = false;
|
||||
Program.initialRun = false;
|
||||
Program.mainForm.SetWorking(true);
|
||||
if (!Utils.InputIsValid(current.inPath, current.outPath, current.inFps, current.interpFactor, current.outMode)) return; // General input checks
|
||||
if (!Utils.InputIsValid(current.inPath, current.outPath, current.inFps, current.interpFactor, current.outMode, current.tempFolder)) return; // General input checks
|
||||
if (!Utils.CheckAiAvailable(current.ai, current.model)) return; // Check if selected AI pkg is installed
|
||||
if (!AutoEncodeResume.resumeNextRun && !Utils.CheckDeleteOldTempFolder()) return; // Try to delete temp folder if an old one exists
|
||||
if (!Utils.CheckPathValid(current.inPath)) return; // Check if input path/file is valid
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Flowframes.Main
|
||||
current.RefreshAlpha();
|
||||
current.stepByStep = true;
|
||||
|
||||
if (!InterpolateUtils.InputIsValid(current.inPath, current.outPath, current.inFps, current.interpFactor, current.outMode)) return; // General input checks
|
||||
if (!InterpolateUtils.InputIsValid(current.inPath, current.outPath, current.inFps, current.interpFactor, current.outMode, current.tempFolder)) return; // General input checks
|
||||
if (!InterpolateUtils.CheckPathValid(current.inPath)) return; // Check if input path/file is valid
|
||||
|
||||
if (step.Contains("Extract Frames"))
|
||||
|
||||
@@ -87,6 +87,7 @@ namespace Flowframes.Main
|
||||
if (Config.GetInt(Config.Key.tempFolderLoc) == 4)
|
||||
{
|
||||
string custPath = Config.Get(Config.Key.tempDirCustom);
|
||||
|
||||
if (IoUtils.IsDirValid(custPath))
|
||||
basePath = custPath;
|
||||
}
|
||||
@@ -94,7 +95,7 @@ namespace Flowframes.Main
|
||||
return Path.Combine(basePath, Path.GetFileNameWithoutExtension(inPath).StripBadChars().Remove(" ").Trunc(30, false) + "-temp");
|
||||
}
|
||||
|
||||
public static bool InputIsValid(string inDir, string outDir, Fraction fpsIn, float factor, I.OutMode outMode)
|
||||
public static bool InputIsValid(string inDir, string outDir, Fraction fpsIn, float factor, I.OutMode outMode, string tempFolder)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -114,6 +115,12 @@ namespace Flowframes.Main
|
||||
passes = false;
|
||||
}
|
||||
|
||||
if (passes && tempFolder.StartsWith(@"\\"))
|
||||
{
|
||||
UiUtils.ShowMessageBox("Flowframes does not support UNC/Network paths as a temp folder!\nPlease use a local path instead.");
|
||||
passes = false;
|
||||
}
|
||||
|
||||
if (passes && fpsOut < 1f || fpsOut > 1000f)
|
||||
{
|
||||
string imgSeqNote = isFile ? "" : "\n\nWhen using an image sequence as input, you always have to specify the frame rate manually.";
|
||||
@@ -188,6 +195,13 @@ namespace Flowframes.Main
|
||||
|
||||
public static bool CheckPathValid(string path)
|
||||
{
|
||||
if (path.StartsWith(@"\\"))
|
||||
{
|
||||
UiUtils.ShowMessageBox("Input path is not valid.\nFlowframes does not support UNC/Network paths.");
|
||||
I.Cancel();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (IoUtils.IsPathDirectory(path))
|
||||
{
|
||||
if (!IoUtils.IsDirValid(path))
|
||||
|
||||
Reference in New Issue
Block a user