#1743: choose default names around protected overflow paths

This commit is contained in:
Kristian Myram committed 2026-10-30 10:13:38 +01:00
1 parent 107b00e538
commit 2112e553ec
2 files changed
+23 -8

No files matched your search

+10 -8
View File
@@ -621,18 +621,20 @@ impl Session {
let Ok(outputs) = self.outputs_of(item, None) else { break };
let mut in_the_way = false;
for (module, path) in &outputs {
match self.check_output(&protected, module, path) {
Ok(Some(_)) => in_the_way = true,
Err(_) => {
item.output.output = template;
return;
}
Ok(None) => {}
}
let Ok(paths) = self.write_paths(module, path) else {
item.output.output = template;
return;
};
for destination in &paths {
match self.check_output(&protected, module, destination) {
Ok(Some(_)) => in_the_way = true,
Err(_) => {
item.output.output = template;
return;
}
Ok(None) => {}
}
}
in_the_way |= paths.iter().any(|path| queue.clash(&self.write_of(module, path, false)).is_some());
}
if !in_the_way {
@@ -695,6 +695,19 @@ fn possible_storage_overflow_destinations_cannot_replace_footage() {
assert_eq!(f.read("overflow/Main.mp4"), SOURCE);
}
#[test]
fn default_names_avoid_protected_storage_overflow_destinations() {
let mut f = Fixture::new("overflow-protected-default");
f.comp("Main");
with_overflow(&mut f);
f.footage("overflow/Main.mp4");
f.add(json!({"storageOverflow": true}));
assert_eq!(f.output(0), f.path("Main_1.mp4"));
f.render(json!({})).unwrap();
assert_eq!(f.exported().len(), 1);
assert_eq!(f.read("overflow/Main.mp4"), SOURCE);
}
/// After Effects numbers the second item of one composition (`Comp 1_1.mov`). A default output
/// name that another item of the queue already has is numbered the same way.
#[test]