mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-24 10:09:32 -06:00
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:
co-authored by
Claude Opus 5.5
parent
e52ce29579
commit
ced1857637
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user