Skip to content

[BUG] Fix Exception when PathDirectory empty and click "Change to relative folder" #376

@Hofknecht

Description

@Hofknecht

Michelle reported:
System.ArgumentException: The path is empty. (Parameter 'path') at System.IO.Path.GetRelativePath(String relativeTo, String path, StringComparison comparisonType) at System.IO.Path.GetRelativePath(String relativeTo, String path) at SystemTrayMenu.UserInterface.SettingsForm.ButtonChangeRelativeFolder_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message

Via user.config it is possible to set the path manually. When you set a empty directory like this

then start the STM, you get a dialog to choose a path.
When pressing cancel the app starts although no path is set.
Via system tray icon, right click, you can start the Settings menu and the path is empty.
Wehn then pressing "Change to relative folder", you get a ArgumentException

appeared only once and after restart you are asked to set a path, so it is uncritical

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions