Handle 'Access Denied' casa on importing Secrets

This commit is contained in:
Jim Norman 2006-09-22 20:29:12 +00:00
parent 818c0796dd
commit 36292f46b7
2 changed files with 28 additions and 19 deletions

View File

@ -259,6 +259,8 @@ namespace Novell.CASA.GUI
for (int i=0; i<dirs.Length; i++) for (int i=0; i<dirs.Length; i++)
{ {
if (dirs[i].Name.StartsWith(".")) continue;
ts.AppendValues(new Gdk.Pixbuf (Common.IMAGE_PATH + "folder.png"), dirs[i].Name, "", "File folder"); ts.AppendValues(new Gdk.Pixbuf (Common.IMAGE_PATH + "folder.png"), dirs[i].Name, "", "File folder");
} }

View File

@ -58,6 +58,8 @@ namespace Novell.CASA.GUI
if (File.Exists(sFile)) if (File.Exists(sFile))
{ {
try
{
// let's read it // let's read it
FileStream fs = new FileStream(sFile, FileMode.Open); FileStream fs = new FileStream(sFile, FileMode.Open);
buffer = new byte[fs.Length]; buffer = new byte[fs.Length];
@ -80,6 +82,11 @@ namespace Novell.CASA.GUI
GetMasterPasswordUsedForImport(); GetMasterPasswordUsedForImport();
} }
} }
catch (Exception e)
{
CommonGUI.DisplayMessage(Gtk.MessageType.Error, e.Message);
}
}
} }
} }