fix(wayland): pass on an unclassified capture error instead of "x11 expected"

Every portal handshake failure is tagged and gets its own message, so the
untagged errors that still reach this fallback at login are internal ones
(GStreamer init, a poisoned lock). Reporting them as "x11 expected" sent
users off to switch to X11 for faults X11 does not fix, and hid the real
error. Send the error itself, as the Ubuntu 21+ branch already does.

No regression test: CI runs on Ubuntu 24.04, where map_err_scrap takes the
Ubuntu branch and returns the raw error both before and after this change.

Refs #16829

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rustdeskandClaude Opus 5.5 committed 2026-11-03 08:26:06 +08:00
1 parent 41f182e636
commit beeeef14f0
1 file changed
+4 -2
+4 -2
View File
@@ -12,7 +12,7 @@ use std::io;
use crate::{
client::{
SCRAP_OTHER_VERSION_OR_X11_REQUIRED, SCRAP_UBUNTU_HIGHER_REQUIRED,
SCRAP_X11_REQUIRED, SCRAP_XDP_PORTAL_UNAVAILABLE,
SCRAP_XDP_PORTAL_UNAVAILABLE,
},
platform::linux::is_x11,
};
@@ -82,7 +82,9 @@ fn map_err_scrap(err: String) -> io::Error {
} else if err_lower.contains("pipewire") {
io::Error::new(io::ErrorKind::Other, SCRAP_OTHER_VERSION_OR_X11_REQUIRED)
} else {
io::Error::new(io::ErrorKind::Other, SCRAP_X11_REQUIRED)
// Unclassified, so say what failed: "x11 expected" sent users off to switch to X11
// for faults X11 does not fix (#16829).
io::Error::new(io::ErrorKind::Other, err)
}
}
}