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

Catch permission exception on folder selection

If users don't have the permissions to scan a folder hierarchy, they're
not supposed to transfer it anyway - so just show an error message.

Fixes #48
parent ec0fc75d
No related branches found
No related tags found
No related merge requests found
......@@ -303,7 +303,17 @@ namespace ATxTray
return;
}
NewTxConfirmationDialog();
try {
NewTxConfirmationDialog();
}
catch (UnauthorizedAccessException ex) {
MessageBox.Show("ERROR: the selected directory\n\n" +
$"[{_selectedDir.Name}]\n\n" +
"contains files or folders that are not readable\n" +
"due to insufficient permissions!\n\n" +
ex.Message,
"Error reading directory", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
/// <summary>
......
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