record-daemon: keep the process-name helper Windows-only
record-daemon / Build, check and test (push) Failing after 1m14s
record-daemon / Build, check and test (push) Failing after 1m14s
The process walk that compares exe names is the Windows one; on Linux nothing called normalize, and -Dwarnings in CI made that a failure.
This commit is contained in:
1 parent
94cbdcf0b1
commit
18a952d4c1
1 file changed
+4
@@ -448,6 +448,10 @@ fn pids_of(exe: &str) -> Vec<u32> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// `Discord.exe` and `discord` name the same process.
|
/// `Discord.exe` and `discord` name the same process.
|
||||||
|
///
|
||||||
|
/// Only the Windows process walk compares names; elsewhere the settings screen does its own and
|
||||||
|
/// this is left to the test.
|
||||||
|
#[cfg(any(target_os = "windows", test))]
|
||||||
fn normalize(name: &str) -> String {
|
fn normalize(name: &str) -> String {
|
||||||
let name = name.trim().to_ascii_lowercase();
|
let name = name.trim().to_ascii_lowercase();
|
||||||
name.strip_suffix(".exe").unwrap_or(&name).to_string()
|
name.strip_suffix(".exe").unwrap_or(&name).to_string()
|
||||||
|
|||||||
Reference in new issue
Block a user