From 69a9e988afd0f738634c6cd3a69c82ec3efc6338 Mon Sep 17 00:00:00 2001 From: Kirill Zhdanovich Date: Mon, 25 Nov 2013 18:23:52 +0300 Subject: [PATCH] [Bookmarks] Open MWM kHz in Google Earth. We can't use non ascii symbols in kmz's filenames, because of bug in GE. --- coding/zip_creator.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/coding/zip_creator.cpp b/coding/zip_creator.cpp index be37a15b55..648bb0a840 100644 --- a/coding/zip_creator.cpp +++ b/coding/zip_creator.cpp @@ -1,5 +1,7 @@ #include "zip_creator.hpp" +#include "../../base/string_utils.hpp" + #include "../../coding/file_name_utils.hpp" #include "../../coding/internal/file_data.hpp" #include "../../coding/constants.hpp" @@ -60,6 +62,9 @@ bool CreateZipFromPathDeflatedAndDefaultCompression(string const & filePath, str CreateTMZip(zipInfo.tmz_date); string fileName = filePath; my::GetNameFromFullPath(fileName); + if (!strings::IsASCIIString(fileName)) + fileName = "MapsWithMe.kml"; + if (::zipOpenNewFileInZip(zip.Handle(), fileName.c_str(), &zipInfo, NULL, 0, NULL, 0, "ZIP from MapsWithMe", Z_DEFLATED, Z_DEFAULT_COMPRESSION) < 0) {