fix: create the update directory for fresh named volumes [CI]
ci/woodpecker/push/main-amd64-build Pipeline was successful

ConfigStore.Write only created the config root, so a new volume without update/ made update offers fail with IO_PathNotFound. Create the parent directory on write and ship an empty update/ in the node images.
This commit is contained in:
justme committed 2026-10-07 02:51:39 +08:00
1 parent ef75c9f510
commit 7613f67fed
3 files changed
+21 -1

No files matched your search

+2 -1
View File
@@ -243,7 +243,8 @@ public sealed class ConfigStore
throw new InvalidOperationException("config files must stay inside the config directory");
}
Directory.CreateDirectory(_directory);
// 相对路径里的子目录(例如 update/)也要建:新建的命名卷里只有镜像自带的目录
Directory.CreateDirectory(Path.GetDirectoryName(path)!);
string temp = path + ".tmp";
#pragma warning disable RS0030 // 纯采集边界的唯一豁免点:ConfigStore 只写配置目录,先写临时文件再原子替换
File.WriteAllBytes(temp, content);