From b74359e97643be0f43034c3aeab533a2389a939f Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 30 Nov 2026 18:21:16 +0000 Subject: enstate: submissions waiting for the next switch --migrate first takes the submissions in STATE/incoming, in the order of their names: planned against the schema, stored if accepted (their views follow with the rest), removed, and moved to STATE/refused if refused, which refuses the migration. A dry run (the check before a switch) does so on a copy of the snapshots, changing nothing. --stage leaves a marker, STATE/migrate-due, for the next switch to migrate even if the schema doesn't change; --migrate removes it. Scratch directories are cleaned up without following the symbolic links in them. --- src/scratch.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/scratch.rs') diff --git a/src/scratch.rs b/src/scratch.rs index dddd91b..8d469c3 100644 --- a/src/scratch.rs +++ b/src/scratch.rs @@ -63,7 +63,11 @@ pub fn set_modes(dir: &Path, mode: u32) -> Result<()> { std::fs::set_permissions(dir, reach).with_context(|| format!("chmod {}", dir.display()))?; for entry in std::fs::read_dir(dir)? { let entry = entry?; - if entry.file_type()?.is_dir() { + let kind = entry.file_type()?; + if kind.is_symlink() { + // A link's own mode means nothing, and following it would change its target. + continue; + } else if kind.is_dir() { set_modes(&entry.path(), mode)?; } else { std::fs::set_permissions(entry.path(), std::fs::Permissions::from_mode(mode))?; -- cgit v1.3.1