Firefox Extension: Save key/values when the length is greater than 0.
This commit is contained in:
parent
b429401790
commit
081799ea65
@ -234,8 +234,7 @@ function promptuser()
|
||||
obj = Components.classes[cid].createInstance();
|
||||
obj = obj.QueryInterface(Components.interfaces.IMiCASAKeys);
|
||||
}
|
||||
|
||||
//alert("Reading");
|
||||
|
||||
var theValue = new String;
|
||||
var res;
|
||||
try
|
||||
@ -383,20 +382,23 @@ function promptuser()
|
||||
{
|
||||
//alert('do nothing');
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
logMessage('Writing ' + secretID + ' : ' + sKey + ' : xxxxxxx');
|
||||
try {
|
||||
res = obj.miCASAWriteKey(secretID, sKey, sValue);
|
||||
if (res != 0)
|
||||
logMessage('Error saving key');
|
||||
}
|
||||
catch (err)
|
||||
{
|
||||
alert('CASA services not available');
|
||||
logMessage(err);
|
||||
window.close();
|
||||
return;
|
||||
if (sValue.length > 0)
|
||||
{
|
||||
logMessage('Writing ' + secretID + ' : ' + sKey + ' : xxxxxxx');
|
||||
try {
|
||||
res = obj.miCASAWriteKey(secretID, sKey, sValue);
|
||||
if (res != 0)
|
||||
logMessage('Error saving key');
|
||||
}
|
||||
catch (err)
|
||||
{
|
||||
alert('CASA services not available');
|
||||
logMessage(err);
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user