diff --git a/src-tauri/src/commands/download/mod.rs b/src-tauri/src/commands/download/mod.rs index cde58859..0ccfed11 100644 --- a/src-tauri/src/commands/download/mod.rs +++ b/src-tauri/src/commands/download/mod.rs @@ -2568,10 +2568,19 @@ mod tests { // Why the absolute case needs its own guard rather than folding: the // join the download path performs discards the base entirely. - assert_eq!( - PathBuf::from(root).join("/etc/cron.d/pwn"), - PathBuf::from("/etc/cron.d/pwn") - ); + // + // clippy::join_absolute_paths flags exactly this shape, and is right to + // in production code — here the discarded base *is* the assertion, so + // the lint is allowed rather than the code changed. Note the lint would + // not have caught the original defect: the real join sites take a + // variable, and the lint only fires on a literal starting with `/`. + #[allow(clippy::join_absolute_paths)] + { + assert_eq!( + PathBuf::from(root).join("/etc/cron.d/pwn"), + PathBuf::from("/etc/cron.d/pwn") + ); + } } /// The paths the app builds for itself have to survive unchanged: files are