From 4f53c776c9e75806ace39cda93c3c09255bc5220 Mon Sep 17 00:00:00 2001 From: Jim Norman Date: Fri, 10 Nov 2006 06:10:01 +0000 Subject: [PATCH] Handle import Conflict when file is encrypted. --- CASA/gui/ImportSecrets.cs | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/CASA/gui/ImportSecrets.cs b/CASA/gui/ImportSecrets.cs index 26a56783..84e6177c 100644 --- a/CASA/gui/ImportSecrets.cs +++ b/CASA/gui/ImportSecrets.cs @@ -184,12 +184,24 @@ namespace Novell.CASA.GUI if (m_objMiCasa != null) { m_objMiCasa.AggregateStore(); - } - - if (addSecrets.GetStatus().Equals("Success")) - CommonGUI.DisplayMessage(Gtk.MessageType.Info, "Import complete"); - else - CommonGUI.DisplayMessage(Gtk.MessageType.Info, "Failed: " + addSecrets.GetStatus()); + } + + // check for conflicts + if (m_ss == null) + m_ss = SecretStore.getInstance(); + + m_scConflicts = m_ss.enumerateSecretIDs(SecretStore.SSCS_CONFLICT_KEYCHAIN); + if (m_scConflicts.Count > 0) + { + HandleConficts(m_ss, m_scConflicts); + } + else + { + if (addSecrets.GetStatus().Equals("Success")) + CommonGUI.DisplayMessage(Gtk.MessageType.Info, "Import complete"); + else + CommonGUI.DisplayMessage(Gtk.MessageType.Info, "Failed: " + addSecrets.GetStatus()); + } } }