D8387: Workaround incorrectly returned EEXIST instead of EPERM regression introduced by libsmbclient 4.7

Martin Flöser noreply at phabricator.kde.org
Sat Oct 21 11:33:10 UTC 2017


graesslin added inline comments.

INLINE COMMENTS

> kio_smb.cpp:50-60
> +    static const QVector<QString> brokenVersions{ "4.7.0" };
> +
> +    const QString currentVerString = QString::fromLatin1(smbc_version());
> +    qCDebug(KIO_SMB) << "Using libsmbclient library version" << currentVerString;
> +
> +    for (const QString &verString : brokenVersions) {
> +        if (verString == currentVerString) {

I like this approach. But I would consider every version >= 4.7.0 as broken. You don't know yet whether 4.7.1 will fix it. If 4.7.1 doesn't fix it, we need to patch this again or it would reintroduce the regression. So I would consider everything broken till the release comes out and then go for something like:

  if (version >= QVersionNumber(4,7,0) && version < QVersionNumber(x, y, z)) { broken()};

and as you can see in this suggestion: have a look at QVersionNumber. It should make this code easier.

REPOSITORY
  R320 KIO Extras

REVISION DETAIL
  https://phabricator.kde.org/D8387

To: madcatx, ngraham, davidedmundson, elvisangelaccio, #frameworks
Cc: graesslin, z3ntu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171021/a0acfe5b/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list