diff --git a/ATxService/AutoTx.cs b/ATxService/AutoTx.cs index 58cbcc9833e25effec1415d5ecc1cf27ff4018dd..2f95e7fc14cd6ba098bd2f8f2cb2283375e6649d 100644 --- a/ATxService/AutoTx.cs +++ b/ATxService/AutoTx.cs @@ -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); diff --git a/ATxTray/AutoTxTray.cs b/ATxTray/AutoTxTray.cs index eecbc91b0b9f3e678574723f9b795dcf4cb412b9..cf24f6ad53703319177da735c2504f18271b6aa9 100644 --- a/ATxTray/AutoTxTray.cs +++ b/ATxTray/AutoTxTray.cs @@ -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", }; diff --git a/Scripts/Make-Package.ps1 b/Scripts/Make-Package.ps1 index b16fdbe44e96ac23b47a67482113f261c478f98d..cf5e36136bd09f734a2004ecb78201a43bbafb85 100644 --- a/Scripts/Make-Package.ps1 +++ b/Scripts/Make-Package.ps1 @@ -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 diff --git a/Updater/Update-Service.ps1 b/Updater/Update-Service.ps1 index d5e47082b1daa3c698dd11c333190a0410c561f9..31182147950801519e0d645c3daa7de878600714 100644 --- a/Updater/Update-Service.ps1 +++ b/Updater/Update-Service.ps1 @@ -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"