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

Check if DestinationDirectory and TmpTransferDir exist.

Refers to issue #7
parent 0fba356b
No related branches found
No related tags found
No related merge requests found
......@@ -168,6 +168,23 @@ namespace AutoTx
configInvalid = true;
}
// DestinationDirectory
if (!_config.DestinationDirectory.StartsWith(@"\\")) {
writeLog("WARNING: DestinationDirectory is no UNC path!");
}
if (!Directory.Exists(_config.DestinationDirectory)) {
writeLog("ERROR: can't find destination: " + _config.DestinationDirectory);
configInvalid = true;
}
// TmpTransferDir
var tmpTransferPath = Path.Combine(_config.DestinationDirectory,
_config.TmpTransferDir);
if (!Directory.Exists(tmpTransferPath)) {
writeLog("ERROR: temporary transfer dir doesn't exist: " + tmpTransferPath);
configInvalid = true;
}
// ServiceTimer
if (_config.ServiceTimer < 1000) {
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