Fix bug with bookmark duplicating name.

This commit is contained in:
vng 2012-10-11 19:50:54 +03:00 committed by Alex Zolotarev
parent bab07f0710
commit 635addb515

View file

@ -375,7 +375,7 @@ string BookmarkCategory::GenerateUniqueFileName(const string & path, string cons
string const utfName = uniName.empty() ? "Bookmarks" : strings::ToUtf8(uniName);
size_t counter = 1;
string suffix;
while (Platform::IsFileExistsByFullPath(path + utfName + suffix))
while (Platform::IsFileExistsByFullPath(path + utfName + suffix + ".kml"))
suffix = strings::to_string(counter++);
return (path + utfName + suffix + ".kml");
}