# HG changeset patch # User moel.mich # Date 1286306871 0 # Node ID 7e98c9e1a4f4b7abf9a0537384b709f252d141fc # Parent 88131b86378b23ed57ad10fbe787441e727612c3 Fixed Issue 125. diff -r 88131b86378b -r 7e98c9e1a4f4 GUI/MainForm.cs --- a/GUI/MainForm.cs Tue Oct 05 18:59:13 2010 +0000 +++ b/GUI/MainForm.cs Tue Oct 05 19:27:51 2010 +0000 @@ -350,8 +350,15 @@ settings.SetValue("treeView.Columns." + column.Header + ".Width", column.Width); - settings.Save(Path.ChangeExtension( - System.Windows.Forms.Application.ExecutablePath, ".config")); + string fileName = Path.ChangeExtension( + System.Windows.Forms.Application.ExecutablePath, ".config"); + try { + settings.Save(fileName); + } catch (UnauthorizedAccessException) { + MessageBox.Show("Access to the path '" + fileName + "' is denied. " + + "The current seetings could not be saved.", + "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } } private void MainForm_FormClosed(object sender, FormClosedEventArgs e) {