This commit is contained in:
JustArchi
2019-02-19 00:06:50 +01:00
parent a3112e0402
commit 22d89d6ea1

View File

@@ -1421,16 +1421,16 @@ namespace ArchiSteamFarm {
return message.Replace("\\", "\\\\").Replace("[", "\\["); return message.Replace("\\", "\\\\").Replace("[", "\\[");
} }
private static string GetBotFilePath(string botName, EBotFileType filePath) { private static string GetBotFilePath(string botName, EBotFileType fileType) {
if (string.IsNullOrEmpty(botName) || !Enum.IsDefined(typeof(EBotFileType), filePath)) { if (string.IsNullOrEmpty(botName) || !Enum.IsDefined(typeof(EBotFileType), fileType)) {
ASF.ArchiLogger.LogNullError(nameof(botName) + " || " + nameof(filePath)); ASF.ArchiLogger.LogNullError(nameof(botName) + " || " + nameof(fileType));
return null; return null;
} }
string botPath = Path.Combine(SharedInfo.ConfigDirectory, botName); string botPath = Path.Combine(SharedInfo.ConfigDirectory, botName);
switch (filePath) { switch (fileType) {
case EBotFileType.Config: case EBotFileType.Config:
return botPath + SharedInfo.ConfigExtension; return botPath + SharedInfo.ConfigExtension;
@@ -1453,7 +1453,7 @@ namespace ArchiSteamFarm {
return botPath + SharedInfo.SentryHashExtension; return botPath + SharedInfo.SentryHashExtension;
default: default:
ASF.ArchiLogger.LogGenericError(string.Format(Strings.WarningUnknownValuePleaseReport, nameof(filePath), filePath)); ASF.ArchiLogger.LogGenericError(string.Format(Strings.WarningUnknownValuePleaseReport, nameof(fileType), fileType));
return null; return null;
} }