data folder
This commit is contained in:
parent
6591350142
commit
39b00b6750
|
@ -125,21 +125,26 @@ namespace Core.Main
|
||||||
_state = value;
|
_state = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void WriteStateToFile()
|
public void WriteStateToFile()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
try
|
|
||||||
{
|
|
||||||
mutex.WaitOne(); // Acquire the mutex
|
mutex.WaitOne(); // Acquire the mutex
|
||||||
|
|
||||||
string filePath = "_data/AnalyzerState.";
|
string dirPath = "_data";
|
||||||
|
string filePath = Path.Combine(dirPath, "AnalyzerState.");
|
||||||
|
|
||||||
|
// Ensure the directory exists
|
||||||
|
Directory.CreateDirectory(dirPath);
|
||||||
|
|
||||||
File.WriteAllText(filePath, this.State.ToString());
|
File.WriteAllText(filePath, this.State.ToString());
|
||||||
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
mutex.ReleaseMutex(); // Release the mutex even if exceptions occur
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
mutex.ReleaseMutex(); // Release the mutex even if exceptions occur
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public int RunCount
|
public int RunCount
|
||||||
|
|
|
@ -6,7 +6,7 @@ using Core.Helper;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion("2.8.1")]
|
[assembly: AssemblyVersion("2.8.2")]
|
||||||
[assembly: AssemblyProduct("PT Magic")]
|
[assembly: AssemblyProduct("PT Magic")]
|
||||||
|
|
||||||
namespace PTMagic
|
namespace PTMagic
|
||||||
|
|
Loading…
Reference in New Issue