diff --git a/AutoTx/AutoTx.cs b/AutoTx/AutoTx.cs index 63ce7c8b5dc4fe400170b4bf8727c0140de6823f..313ae528c956cef50b7791c54e6f6de919f69759 100644 --- a/AutoTx/AutoTx.cs +++ b/AutoTx/AutoTx.cs @@ -256,7 +256,7 @@ namespace AutoTx writeLogDebug("------ Loaded status flags ------"); writeLogDebug("CurrentTransferSrc: " + _status.CurrentTransferSrc); writeLogDebug("CurrentTargetTmp: " + _status.CurrentTargetTmp); - writeLogDebug("FilecopyFinished: " + _status.FilecopyFinished); + writeLogDebug("TransferInProgress: " + _status.TransferInProgress); writeLogDebug("LastStorageNotification: " + _status.LastStorageNotification.ToString("yyyy-MM-dd HH:mm:ss")); writeLogDebug("LastAdminNotification: " + @@ -358,7 +358,7 @@ namespace AutoTx catch (Exception ex) { writeLog("Error terminating the RoboCopy process: " + ex.Message, true); } - _status.FilecopyFinished = false; + _status.TransferInProgress = true; writeLog("Not all files were transferred - will resume upon next start"); writeLogDebug("CurrentTransferSrc: " + _status.CurrentTransferSrc); // should we delete an incompletely transferred file on the target? @@ -654,7 +654,7 @@ namespace AutoTx // only happens while all system parameters are within their valid ranges // make sure the service is in an expected state before cleaning up: - if (_transferState != TxState.Stopped || _status.FilecopyFinished != true) + if (_transferState != TxState.Stopped || _status.TransferInProgress) return; if (_status.CurrentTargetTmp.Length > 0) { @@ -684,10 +684,10 @@ namespace AutoTx // CONDITIONS (a transfer has to be resumed): // - CurrentTargetTmp has to be non-empty // - TransferState has to be "Stopped" - // - FileCopyFinished must be false + // - TransferInProgress must be true if (_status.CurrentTargetTmp.Length <= 0 || _transferState != TxState.Stopped || - _status.FilecopyFinished) + _status.TransferInProgress == false) return; writeLogDebug("Resuming transfer from '" + _status.CurrentTransferSrc + diff --git a/AutoTx/RoboCommand.cs b/AutoTx/RoboCommand.cs index 4cfa85bd609c35984a4d08861081518800ae514b..cbce8861cb9ec86c2dc853d989407e0ef49b976f 100644 --- a/AutoTx/RoboCommand.cs +++ b/AutoTx/RoboCommand.cs @@ -27,7 +27,7 @@ namespace AutoTx CreateNewDirectory(ExpandCurrentTargetTmp(), false); _transferState = TxState.Active; - _status.FilecopyFinished = false; + _status.TransferInProgress = true; try { // events _roboCommand.OnCopyProgressChanged += RsProgressChanged; @@ -136,7 +136,7 @@ namespace AutoTx _transferState = TxState.Stopped; _roboCommand.Dispose(); _roboCommand = new RoboCommand(); - _status.FilecopyFinished = true; + _status.TransferInProgress = false; } /// <summary> diff --git a/AutoTx/XmlWrapper/ServiceStatus.cs b/AutoTx/XmlWrapper/ServiceStatus.cs index 8ed046c1ab7602e67f7ecf54749e4c954793e0ef..4cd705aac87759e05f8629b6ee5a8c8ba3b7ac3a 100644 --- a/AutoTx/XmlWrapper/ServiceStatus.cs +++ b/AutoTx/XmlWrapper/ServiceStatus.cs @@ -17,7 +17,7 @@ namespace AutoTx.XmlWrapper string _currentTransferSrc; string _currentTargetTmp; - bool _filecopyFinished; + bool _transferInProgress; private bool _serviceSuspended; private bool _cleanShutdown; @@ -83,10 +83,10 @@ namespace AutoTx.XmlWrapper } } - public bool FilecopyFinished { - get { return _filecopyFinished; } + public bool TransferInProgress { + get { return _transferInProgress; } set { - _filecopyFinished = value; + _transferInProgress = value; log("FilecopyFinished was updated (" + value + "), calling Serialize()..."); Serialize(); } @@ -115,7 +115,7 @@ namespace AutoTx.XmlWrapper public ServiceStatus() { _currentTransferSrc = ""; _currentTargetTmp = ""; - _filecopyFinished = true; + _transferInProgress = false; } public void Serialize() {