FF-1695: Improving error message writing to protected path

This commit is contained in:
John Andrews
2024-07-30 18:54:11 +12:00
parent 693926706b
commit a9872843a6
3 changed files with 6 additions and 2 deletions

View File

@@ -125,7 +125,9 @@ public class MoveFile : Node
if (args.MoveFile(dest).Failed(out var error))
{
args.Logger?.WLog("Failed to moving working file: " + error);
args.FailureReason = "Failed to move file: " + error;
if (error.Contains(": ") == false)
error = "Failed to move file: " + error;
args.FailureReason = error;
args.Logger?.ELog(args.FailureReason);
return -1;
}
@@ -134,7 +136,9 @@ public class MoveFile : Node
{
if (args.FileService.FileMove(inputFile, dest).Failed(out string error))
{
args.FailureReason = "Failed to move file: " + error;
if (error.Contains(": ") == false)
error = "Failed to move file: " + error;
args.FailureReason = error;
args.Logger?.ELog(args.FailureReason);
return -1;
}

Binary file not shown.

Binary file not shown.