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

Check CurrentTransferSrc and CurrentTargetTmp for valid settings.

Refers to issue #7
parent 90f83019
No related branches found
No related tags found
No related merge requests found
...@@ -185,6 +185,22 @@ namespace AutoTx ...@@ -185,6 +185,22 @@ namespace AutoTx
configInvalid = true; configInvalid = true;
} }
// CurrentTransferSrc
if (_status.CurrentTransferSrc.Length > 0
&& !Directory.Exists(_status.CurrentTransferSrc)) {
writeLog("WARNING: status file contains non-existing source path of an " +
"unfinished transfer: " + _status.CurrentTransferSrc);
_status.CurrentTransferSrc = "";
}
// CurrentTargetTmp
if (_status.CurrentTargetTmp.Length > 0
&& !Directory.Exists(ExpandCurrentTargetTmp())) {
writeLog("WARNING: status file contains non-existing temporary path of an " +
"unfinished transfer: " + _status.CurrentTargetTmp);
_status.CurrentTargetTmp = "";
}
// ServiceTimer // ServiceTimer
if (_config.ServiceTimer < 1000) { if (_config.ServiceTimer < 1000) {
writeLog("ERROR: ServiceTimer must not be smaller than 1000 ms!"); writeLog("ERROR: ServiceTimer must not be smaller than 1000 ms!");
......
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