From db0d3c6ec998d756f05be285fc037cc30f66d349 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 20 Jun 2017 11:28:01 +0200 Subject: [PATCH] =?UTF-8?q?Fixes=20#3387,=20Add=20to=20queue=20does=20not?= =?UTF-8?q?=20work=20/=20crash=20RT=20on=20modern=20Windows=20when=20files?= =?UTF-8?q?=20are=20in=20a=20folder=20which's=20name=20contains=20special?= =?UTF-8?q?=20characters=20(e.g.=20Zdj=C4=99cia)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rtgui/batchqueue.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index f1d29c4d6..04f3537ce 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -237,7 +237,12 @@ bool BatchQueue::saveBatchQueue () const auto& saveFormat = entry->saveFormat; // Warning: for code's simplicity in loadBatchQueue, each field must end by the '|' character, safer than ';' or ',' since it can't be used in paths +#ifdef WIN32 + // on windows it crashes if we don't use c_str() and filename etc. contain special (e.g. chinese) characters, see issue 3387 + file << entry->filename.c_str() << '|' << entry->savedParamsFile.c_str() << '|' << entry->outFileName.c_str() << '|' << saveFormat.format << '|' +#else file << entry->filename << '|' << entry->savedParamsFile << '|' << entry->outFileName << '|' << saveFormat.format << '|' +#endif << saveFormat.jpegQuality << '|' << saveFormat.jpegSubSamp << '|' << saveFormat.pngBits << '|' << saveFormat.pngCompression << '|' << saveFormat.tiffBits << '|' << saveFormat.tiffUncompressed << '|'