| 114 | } |
| 115 | |
| 116 | BookmarkManager::SharingResult ExportSingleFileGpx( |
| 117 | BookmarkManager::KMLDataCollectionPtr::element_type::value_type const & kmlToShare) |
| 118 | { |
| 119 | std::string const fileName = GetFileNameForExport(kmlToShare); |
| 120 | auto filePath = base::JoinPath(GetPlatform().TmpDir(), fileName + std::string{kGpxExtension}); |
| 121 | auto const categoryId = kmlToShare.second->m_categoryData.m_id; |
| 122 | if (!SaveKmlFileSafe(*kmlToShare.second, filePath, KmlFileType::Gpx)) |
| 123 | return {{categoryId}, BookmarkManager::SharingResult::Code::FileError, "Bookmarks file does not exist."}; |
| 124 | return {{categoryId}, std::move(filePath), kGPXMimeType}; |
| 125 | } |
| 126 | |
| 127 | std::string BuildIndexFile(std::vector<std::string> const & filesForIndex) |
| 128 | { |
no test coverage detected