diff --git a/ATxTray/AutoTxTray.cs b/ATxTray/AutoTxTray.cs index 97598496a2a28ea8431e5bb006cb84606e23b185..5f00eb837f062511b636c518f9263b84b4a81a13 100644 --- a/ATxTray/AutoTxTray.cs +++ b/ATxTray/AutoTxTray.cs @@ -295,6 +295,7 @@ namespace ATxTray return; _selectedDir = new DirectoryInfo(dirDialog.FileName); + Log.Debug($"Selected path from folder picker: [{_selectedDir.Name}]"); var drive = dirDialog.FileName.Substring(0, 3); if (drive != _config.SourceDrive) { MessageBox.Show($@"The selected directory '{_selectedDir}' is required to be on " + @@ -303,6 +304,12 @@ namespace ATxTray return; } + if (_selectedDir.Name.Length <= 3) { + MessageBox.Show($"Submitting entire drives ({_selectedDir.Name}) is not allowed!", + "Invalid selection", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + try { NewTxConfirmationDialog(); }