From 2b100c8c173f790eaa80076b138d9386916a5a83 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sun, 3 Aug 2014 20:22:48 +0300 Subject: [PATCH] Try to fix divelogs upload on Windows zip_open needs correct directory separators. QFile::encodeName does not do this conversion, so we must call it explicitly. Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- qt-ui/subsurfacewebservices.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index 565dc3fc7..6fa0b0afe 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -124,7 +124,7 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile, int error_code; - zip = zip_open(QFile::encodeName(tempfile), ZIP_CREATE, &error_code); + zip = zip_open(QFile::encodeName(QDir::toNativeSeparators(tempfile)), ZIP_CREATE, &error_code); if (!zip) { char buffer[1024]; zip_error_to_str(buffer, sizeof buffer, error_code, errno);