From 870640614c94c4ead4ab281ae785f0cd09e58d80 Mon Sep 17 00:00:00 2001 From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch> Date: Thu, 26 Oct 2017 18:42:07 +0200 Subject: [PATCH] Make sure SourceDrive is a local disk. This fixes #12. --- AutoTx/AutoTx.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AutoTx/AutoTx.cs b/AutoTx/AutoTx.cs index 9d9aafd..0b028f8 100644 --- a/AutoTx/AutoTx.cs +++ b/AutoTx/AutoTx.cs @@ -155,6 +155,12 @@ namespace AutoTx @" and a backslash, e.g. 'D:\'!"); configInvalid = true; } + var driveInfo = new DriveInfo(_config.SourceDrive); + if (driveInfo.DriveType != DriveType.Fixed) { + writeLog("ERROR: SourceDrive (" + _config.SourceDrive + ") must be a " + + "local (fixed) drive, OS reports '" + driveInfo.DriveType + "')!"); + configInvalid = true; + } // spooling directories: IncomingDirectory + ManagedDirectory if (_config.IncomingDirectory.StartsWith(@"\")) { -- GitLab