From: Matthieu Gallien Date: Mon, 14 Aug 2023 16:40:49 +0000 (+0200) Subject: on windows file names can always be encoded: fix wrong test X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~92^2^2~42^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f90cb239f3202065ad99026a4db5acd0b5870ab6;p=nextcloud-desktop.git on windows file names can always be encoded: fix wrong test inspired by https://github.com/owncloud/client/pull/6820 Close #5935 Signed-off-by: Matthieu Gallien --- diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index 8d24b56f6..ee694c2bb 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -291,10 +291,10 @@ bool ProcessDirectoryJob::handleExcluded(const QString &path, const Entries &ent } auto localCodec = QTextCodec::codecForLocale(); - if (localCodec->mibEnum() != 106) { + if (!OCC::Utility::isWindows() && localCodec->mibEnum() != 106) { // If the locale codec is not UTF-8, we must check that the filename from the server can // be encoded in the local file system. - // + // (Note: on windows, the FS is always UTF-16, so we don't need to check) // // We cannot use QTextCodec::canEncode() since that can incorrectly return true, see // https://bugreports.qt.io/browse/QTBUG-6925. QTextEncoder encoder(localCodec, QTextCodec::ConvertInvalidToNull);