VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-06-14 16:02:54 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-06-19 16:31:53 (GMT)
commit7d55b028f277fb5598da40e7ae8167ba0a4218a7 (patch)
treef2e3e65ceba362fd9fd24468376b34af08cefae0 /src/Mount
parent44234a0ccccffdd11765516328f5eb324fc34cba (diff)
downloadVeraCrypt-7d55b028f277fb5598da40e7ae8167ba0a4218a7.zip
VeraCrypt-7d55b028f277fb5598da40e7ae8167ba0a4218a7.tar.gz
Windows: Use "PIM" instead of "PIN" in favorites XML file
Diffstat (limited to 'src/Mount')
-rw-r--r--src/Mount/Favorites.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Mount/Favorites.cpp b/src/Mount/Favorites.cpp
index 1b6c59b..382b238 100644
--- a/src/Mount/Favorites.cpp
+++ b/src/Mount/Favorites.cpp
@@ -549,7 +549,12 @@ namespace VeraCrypt
XmlGetAttributeText (xml, "label", label, sizeof (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);
if (favorite.Pin < 0)
favorite.Pin = 0;
@@ -684,7 +689,7 @@ namespace VeraCrypt
s += L" label=\"" + favorite.Label + L"\"";
if (favorite.Pin > 0)
- s += L" pin=\"" + IntToWideString(favorite.Pin) + L"\"";
+ s += L" pim=\"" + IntToWideString(favorite.Pin) + L"\"";
if (favorite.ReadOnly)
s += L" readonly=\"1\"";