diff --git a/Forms/AddSoftware.Designer.cs b/Forms/AddSoftware.Designer.cs index 7940154..d9b6b97 100644 --- a/Forms/AddSoftware.Designer.cs +++ b/Forms/AddSoftware.Designer.cs @@ -188,7 +188,6 @@ private void InitializeComponent() this.Text = "Add Software"; this.ResumeLayout(false); this.PerformLayout(); - } #endregion diff --git a/Forms/AddSoftware.cs b/Forms/AddSoftware.cs index 12be936..623e992 100644 --- a/Forms/AddSoftware.cs +++ b/Forms/AddSoftware.cs @@ -99,6 +99,11 @@ private IEnumerable CheckValue() Main.AddValueToArray(ref reasons, "❌️ Path does not exist"); } + if (PATH_TEXTBOX.Text.Contains("ㅤ")) + { + Main.AddValueToArray(ref reasons, "❌️ Path contains invalid characters"); + } + return reasons; } diff --git a/Forms/EditSoftware.cs b/Forms/EditSoftware.cs index beffae0..8c3e177 100644 --- a/Forms/EditSoftware.cs +++ b/Forms/EditSoftware.cs @@ -101,6 +101,11 @@ private IEnumerable CheckValue() Main.AddValueToArray(ref reasons, "❌️ Path does not exist"); } + if (PATH_TEXTBOX.Text.Contains("ㅤ")) + { + Main.AddValueToArray(ref reasons, "❌️ Path contains invalid characters"); + } + return reasons; } diff --git a/Forms/Main.cs b/Forms/Main.cs index 61e236c..0925969 100644 --- a/Forms/Main.cs +++ b/Forms/Main.cs @@ -454,7 +454,8 @@ private void LaunchSoftwares() if (software.Name != checkBox.Name) continue; string softwarePath = software.Path; string workingDirectory = Path.GetDirectoryName(softwarePath); - if (!File.Exists(softwarePath) || string.IsNullOrEmpty(workingDirectory)) continue; + if (!File.Exists(softwarePath) || string.IsNullOrEmpty(workingDirectory)) + throw new Exception("The software could not be found."); ProcessStartInfo softwareStartInfo = new ProcessStartInfo { FileName = softwarePath,