fix(ci): align lint-safe security paths

This commit is contained in:
elky
2026-09-05 03:19:53 +08:00
parent f5e1420ee6
commit 33d5cd5993
45 changed files with 180 additions and 132 deletions
+5 -5
View File
@@ -781,7 +781,7 @@ fn write_service_definition(path: &str, content: &str, mode: u32) -> anyhow::Res
if result.is_err() {
let _ = std::fs::remove_file(&temporary);
}
return result;
result
}
#[cfg(not(unix))]
@@ -831,7 +831,7 @@ fn validate_private_service_directory(path: &Path) -> anyhow::Result<()> {
}
ancestor = directory.parent();
}
return Ok(());
Ok(())
}
#[cfg(not(unix))]
@@ -864,7 +864,7 @@ fn validate_replaceable_service_file(path: &Path) -> anyhow::Result<()> {
Err(error) if error.kind() == ErrorKind::NotFound => {}
Err(error) => return Err(error.into()),
}
return Ok(());
Ok(())
}
#[cfg(not(unix))]
@@ -910,7 +910,7 @@ fn ensure_private_service_directory(path: &Path, mode: u32) -> anyhow::Result<()
}
directory.set_permissions(std::fs::Permissions::from_mode(mode))?;
directory.sync_all()?;
return Ok(());
Ok(())
}
#[cfg(not(unix))]
@@ -949,7 +949,7 @@ fn open_private_service_log(path: &Path, mode: u32) -> anyhow::Result<()> {
}
file.set_permissions(std::fs::Permissions::from_mode(mode))?;
file.sync_all()?;
return Ok(());
Ok(())
}
#[cfg(not(unix))]
+2 -2
View File
@@ -739,7 +739,7 @@ fn atomic_replace_paths(current_exe: &Path, new_binary: &Path) -> anyhow::Result
}
eprintln!(" Binary replaced: {}", current_exe.display());
return Ok(backup_path);
Ok(backup_path)
}
#[cfg(not(unix))]
@@ -792,7 +792,7 @@ fn restore_tunnel_backup_paths(current_exe: &Path, backup_path: &Path) -> anyhow
error
);
}
return Ok(());
Ok(())
}
#[cfg(not(unix))]