From c2908d24fe9241521b01b9be76c519b0e4664a20 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Sun, 24 Sep 2017 13:05:53 +0200 Subject: [PATCH] Misc --- ArchiSteamFarm/OS.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ArchiSteamFarm/OS.cs b/ArchiSteamFarm/OS.cs index 27a940b81..819e3b93d 100644 --- a/ArchiSteamFarm/OS.cs +++ b/ArchiSteamFarm/OS.cs @@ -46,7 +46,8 @@ namespace ArchiSteamFarm { } internal static void UnixSetFileAccessExecutable(string path) { - if (!File.Exists(path)) { + if (string.IsNullOrEmpty(path) || !File.Exists(path)) { + ASF.ArchiLogger.LogNullError(nameof(path)); return; } @@ -57,6 +58,10 @@ namespace ArchiSteamFarm { } private static void DisableQuickEditMode() { + if (Console.IsOutputRedirected) { + return; + } + // http://stackoverflow.com/questions/30418886/how-and-why-does-quickedit-mode-in-command-prompt-freeze-applications IntPtr consoleHandle = NativeMethods.GetStdHandle(NativeMethods.StandardInputHandle);