[bookmarks] Fixed KMZ importing

This commit is contained in:
Roman Kuznetsov 2019-01-30 14:32:31 +03:00 committed by Daria Volvenkova
parent fa75730e48
commit 5cd63c6129

View file

@ -253,7 +253,7 @@ bool ConvertBookmarks(std::vector<std::string> const & files,
convertedCount = 0;
auto const conversionFolder = base::JoinPath(GetBackupFolderName(),
"conversion");
"conversion");
if (!GetPlatform().IsFileExistsByFullPath(conversionFolder) &&
!GetPlatform().MkDirChecked(conversionFolder))
{
@ -1093,11 +1093,11 @@ void BookmarkManager::LoadBookmarkRoutine(std::string const & filePath, bool isT
{
auto fileSavePath = savePath.get();
auto kmlData = LoadKmlFile(fileSavePath, KmlFileType::Text);
if (kmlData && (::IsMyCategory(userId, kmlData->m_categoryData) || !FromCatalog(*kmlData)))
{
if (m_needTeardown)
return;
if (m_needTeardown)
return;
if (kmlData)
{
if (migrated)
{
std::string fileName = base::GetNameFromFullPathWithoutExt(fileSavePath);
@ -1967,10 +1967,6 @@ void BookmarkManager::ConvertAllKmlFiles(ConversionHandler && handler)
continue;
}
// Skip KML files from the catalog which are not belonged to the user.
if (FromCatalog(*kmlData) && !::IsMyCategory(userId, kmlData->m_categoryData))
continue;
std::string fileName = base::GetNameFromFullPathWithoutExt(f);
auto kmbPath = base::JoinPath(newDir, fileName + kKmbExtension);
size_t counter = 1;