diff options
author | Kirill Zhdanovich <kzhdanovich@gmail.com> | 2013-11-25 19:23:52 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:06:10 +0300 |
commit | 69a9e988afd0f738634c6cd3a69c82ec3efc6338 (patch) | |
tree | 4c1714057121beb3910078ae70adfc554cd367c4 /coding/zip_creator.cpp | |
parent | db64a4e86270d76f66611c9c963fe3febe14537a (diff) |
[Bookmarks] Open MWM kHz in Google Earth.
We can't use non ascii symbols in kmz's filenames, because of bug in GE.
Diffstat (limited to 'coding/zip_creator.cpp')
-rw-r--r-- | coding/zip_creator.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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) { |