Templates: the hard-link check covers every Unix, not only Linux

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bflatastic
2026-10-16 18:39:03 +07:00
co-authored by Claude Opus 5.5
parent e52ce29579
commit ced1857637
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ pub(super) fn validate(cmd: &str, args: &Args) -> Result<(), Failure> {
if path == output {
return true;
}
#[cfg(target_os = "linux")]
#[cfg(unix)]
{
use std::os::unix::fs::MetadataExt;
// Distinct canonical paths can still name the same file through hard links.
+2 -2
View File
@@ -654,7 +654,7 @@ fn template_missing_output_does_not_replace_extracted_media() {
let _ = std::fs::remove_dir_all(&dir);
}
#[cfg(target_os = "linux")]
#[cfg(unix)]
#[test]
fn template_frame_output_cannot_alias_its_template_through_a_hard_link() {
use std::os::unix::fs::MetadataExt;
@@ -672,7 +672,7 @@ fn template_frame_output_cannot_alias_its_template_through_a_hard_link() {
let _ = std::fs::remove_dir_all(&dir);
}
#[cfg(target_os = "linux")]
#[cfg(unix)]
#[test]
fn template_frame_output_cannot_alias_its_values_through_a_hard_link() {
use std::os::unix::fs::MetadataExt;