Commit eea1ecae authored by Anthony Hung's avatar Anthony Hung Committed by Harald Sitter
Browse files

smb/kio_smb_browse: Check error code `EINVAL` to prompt the password dialog

With `samba-libs` >= 4.16, when user connect to the windows file sharing with incorrect user credential, the error code is `EINVAL`.

The user should get the password dialog to enter username and password if the error code is `EINVAL`.

Reference URL:
https://bugzilla.samba.org/show_bug.cgi?id=14983
https://gitlab.gnome.org/GNOME/gvfs/-/issues/611

BUG: 453090
parent c773f481
Pipeline #228003 passed with stage
in 3 minutes and 4 seconds
......@@ -452,7 +452,7 @@ WorkerResult SMBWorker::listDir(const QUrl &kurl)
if (m_current_url.getType() != SMBURLTYPE_ENTIRE_NETWORK && smbc->error() != 0) {
// not smb:// and had an error -> handle it
const int err = smbc->error();
if (err == EPERM || err == EACCES || workaroundEEXIST(err)) {
if (err == EPERM || err == EACCES || err == EINVAL || workaroundEEXIST(err)) {
qCDebug(KIO_SMB_LOG) << "trying checkPassword";
const int passwordError = checkPassword(m_current_url);
if (passwordError == KJob::NoError) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment