mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 22:53:43 +00:00
[core] Update bookmarks filenames
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -124,7 +124,7 @@ std::string BuildIndexFile(std::vector<std::string> const & filesForIndex)
|
||||
std::string content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||
"<kml xmlns=\"http://earth.google.com/kml/2.0\">\n"
|
||||
"<Document>\n"
|
||||
"<name>Organic Maps Bookmarks and Tracks</name>\n";
|
||||
"<name>CoMaps Bookmarks and Tracks</name>\n";
|
||||
for (auto const & fileName : filesForIndex)
|
||||
{
|
||||
content.append("<NetworkLink><name>");
|
||||
@@ -141,7 +141,7 @@ std::string BuildIndexFile(std::vector<std::string> const & filesForIndex)
|
||||
|
||||
BookmarkManager::SharingResult ExportMultipleFiles(BookmarkManager::KMLDataCollectionPtr collection)
|
||||
{
|
||||
auto const kmzFileName = "OrganicMapsBackup_" + std::to_string(base::GenerateYYMMDD(time(nullptr)));
|
||||
auto const kmzFileName = "CoMaps_backup_" + std::to_string(base::GenerateYYMMDD(time(nullptr)));
|
||||
auto kmzFilePath = base::JoinPath(GetPlatform().TmpDir(), kmzFileName + std::string{kKmzExtension});
|
||||
auto const filesDir = "files/";
|
||||
kml::GroupIdCollection categoriesIds;
|
||||
@@ -161,7 +161,7 @@ BookmarkManager::SharingResult ExportMultipleFiles(BookmarkManager::KMLDataColle
|
||||
{
|
||||
std::string fileName = base::FilenameWithoutExt(GetFileNameForExport(kmlToExport));
|
||||
if (!strings::IsASCIIString(fileName))
|
||||
fileName = "OrganicMaps_" + std::to_string(suffix++);
|
||||
fileName = "CoMaps_" + std::to_string(suffix++);
|
||||
auto const kmlPath = base::JoinPath(GetPlatform().TmpDir(), fileName + std::string{kKmlExtension});
|
||||
auto const filePathInArchive = filesDir + fileName + std::string{kKmlExtension};
|
||||
if (!SaveKmlFileSafe(*kmlToExport.second, kmlPath, KmlFileType::Text))
|
||||
|
||||
Reference in New Issue
Block a user