mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-01-04 04:38:12 -06:00
Windows: Use "PIM" instead of "PIN" in favorites XML file
This commit is contained in:
@@ -549,7 +549,12 @@ namespace VeraCrypt
|
|||||||
XmlGetAttributeText (xml, "label", label, sizeof (label));
|
XmlGetAttributeText (xml, "label", label, sizeof (label));
|
||||||
favorite.Label = Utf8StringToWide (label);
|
favorite.Label = Utf8StringToWide (label);
|
||||||
|
|
||||||
XmlGetAttributeText (xml, "pin", label, sizeof (label));
|
XmlGetAttributeText (xml, "pim", label, sizeof (label));
|
||||||
|
if (strlen(label) == 0)
|
||||||
|
{
|
||||||
|
/* support old attribute name before it was changed to PIM*/
|
||||||
|
XmlGetAttributeText (xml, "pin", label, sizeof (label));
|
||||||
|
}
|
||||||
favorite.Pin = strtol (label, NULL, 10);
|
favorite.Pin = strtol (label, NULL, 10);
|
||||||
if (favorite.Pin < 0)
|
if (favorite.Pin < 0)
|
||||||
favorite.Pin = 0;
|
favorite.Pin = 0;
|
||||||
@@ -684,7 +689,7 @@ namespace VeraCrypt
|
|||||||
s += L" label=\"" + favorite.Label + L"\"";
|
s += L" label=\"" + favorite.Label + L"\"";
|
||||||
|
|
||||||
if (favorite.Pin > 0)
|
if (favorite.Pin > 0)
|
||||||
s += L" pin=\"" + IntToWideString(favorite.Pin) + L"\"";
|
s += L" pim=\"" + IntToWideString(favorite.Pin) + L"\"";
|
||||||
|
|
||||||
if (favorite.ReadOnly)
|
if (favorite.ReadOnly)
|
||||||
s += L" readonly=\"1\"";
|
s += L" readonly=\"1\"";
|
||||||
|
|||||||
Reference in New Issue
Block a user