Skip to content
Snippets Groups Projects
Commit 231d684c authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Move status file to "var/" subdirectory

Refers to #5
parent e8ed9e5a
No related branches found
No related tags found
No related merge requests found
......@@ -299,7 +299,7 @@ namespace ATxService
/// </summary>
private void LoadStatus() {
var statusPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
"status.xml");
"var", "status.xml");
try {
Log.Debug("Trying to load status from [{0}]", statusPath);
_status = ServiceStatus.Deserialize(statusPath, _config);
......
......@@ -73,7 +73,7 @@ namespace ATxTray
SetupLogging();
_statusFile = Path.Combine(baseDir, "status.xml");
_statusFile = Path.Combine(baseDir, "var", "status.xml");
Log.Info("-----------------------");
Log.Info("{0} initializing...", AppTitle);
......@@ -114,7 +114,7 @@ namespace ATxTray
Log.Trace("Enabled timer.");
var fsw = new FileSystemWatcher {
Path = baseDir,
Path = Path.Combine(baseDir, "var"),
NotifyFilter = NotifyFilters.LastWrite,
Filter = "status.xml",
};
......
......@@ -66,6 +66,7 @@ if (Test-Path $PkgDir) {
$dir = New-Item -ItemType Container -Force -Path "$($PkgDir)\AutoTx"
$tgt = $dir.FullName
New-Item -ItemType Container -Force -Path "$($PkgDir)\AutoTx\conf" | Out-Null
New-Item -ItemType Container -Force -Path "$($PkgDir)\AutoTx\var" | Out-Null
Copy-Item -Exclude *.pdb -Recurse "$($BinariesDirService)\*" $tgt
Copy-Item -Exclude *.pdb -Recurse "$($BinariesDirTrayApp)\*" $tgt -EA Ignore
......
......@@ -591,7 +591,7 @@ $ServiceRunningBefore = ServiceIsRunning $ServiceName
$ConfigPath = "$($InstallationPath)\conf"
$LogPath = "$($InstallationPath)"
$LogFile = "$($LogPath)\AutoTx.log"
$StatusXml = "$($InstallationPath)\status.xml"
$StatusXml = "$($InstallationPath)\var\status.xml"
$UpdPathConfig = "$($UpdateSourcePath)\Configs"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment