javi-forge 1.38.1 → 1.38.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -154,9 +154,11 @@ export async function runTransaction(input) {
|
|
|
154
154
|
return null;
|
|
155
155
|
// (2) absent + a child IS written into it this run → create + prove.
|
|
156
156
|
const created = must(`create ${fullPath}`, await secureFs.createDirExclusive(parent, path.basename(fullPath), 0o700));
|
|
157
|
+
// Own the created segment before post-create validation so any refusal rolls
|
|
158
|
+
// it back and closes its handle.
|
|
159
|
+
createdDirs.push(created);
|
|
157
160
|
// Post-create identity revalidation + full gate on the new segment.
|
|
158
161
|
must(`revalidate-created ${fullPath}`, await secureFs.revalidateIdentity(fullPath, created.identity));
|
|
159
|
-
createdDirs.push(created);
|
|
160
162
|
await gate(fullPath, created);
|
|
161
163
|
must(`container ${fullPath}`, await secureFs.proveManagedContainer(fullPath));
|
|
162
164
|
return created;
|
|
@@ -284,7 +286,7 @@ export async function runTransaction(input) {
|
|
|
284
286
|
};
|
|
285
287
|
}
|
|
286
288
|
finally {
|
|
287
|
-
for (const handle of [...createdDirs, ...heldOrder]) {
|
|
289
|
+
for (const handle of new Set([...createdDirs, ...heldOrder])) {
|
|
288
290
|
await handle.close().catch(() => { });
|
|
289
291
|
}
|
|
290
292
|
}
|