Modify the build script

When NotStoreConfigHere.txt file exists, the configs not stored in the current folder
This commit is contained in:
2dust
2024-12-30 18:16:07 +08:00
parent d6dd110781
commit 1dcfe661e9
6 changed files with 35 additions and 7 deletions

View File

@@ -517,7 +517,7 @@ namespace ServiceLib.Common
public static bool UpgradeAppExists(out string fileName)
{
fileName = Path.Combine(Utils.StartupPath(), GetExeName("AmazTool"));
fileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, GetExeName("AmazTool"));
return File.Exists(fileName);
}
@@ -675,6 +675,12 @@ namespace ServiceLib.Common
{
try
{
//When this file exists, it is equivalent to having no permission to read and write
if (File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "NotStoreConfigHere.txt")))
{
return false;
}
var tempPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "guiTemps");
if (!Directory.Exists(tempPath))
{