|
| 1 | +diff --git a/dist/archive.js b/dist/archive.js |
| 2 | +index 8b7c4a0..1a2b3c4 100644 |
| 3 | +--- a/dist/archive.js |
| 4 | ++++ b/dist/archive.js |
| 5 | +@@ -164,10 +164,7 @@ |
| 6 | + throw createPipelineTimeoutError(err, params.deadline); |
| 7 | + } |
| 8 | + params.deadline.check(); |
| 9 | +- if (!handleClosedByStream) { |
| 10 | +- await tempHandle.close().catch(() => undefined); |
| 11 | +- handleClosedByStream = true; |
| 12 | +- } |
| 13 | ++ await tempHandle.close().catch(() => undefined); |
| 14 | + tempHandle = null; |
| 15 | + return destinationPath; |
| 16 | + }, |
| 17 | +@@ -181,7 +178,7 @@ |
| 18 | + } |
| 19 | + finally { |
| 20 | + const openTempHandle = tempHandle; |
| 21 | +- if (openTempHandle && !handleClosedByStream) { |
| 22 | ++ if (openTempHandle) { |
| 23 | + await openTempHandle.close().catch(() => undefined); |
| 24 | + } |
| 25 | + } |
| 26 | +diff --git a/dist/file-store-boundary.js b/dist/file-store-boundary.js |
| 27 | +index 3d2e1a0..5b6c7d8 100644 |
| 28 | +--- a/dist/file-store-boundary.js |
| 29 | ++++ b/dist/file-store-boundary.js |
| 30 | +@@ -87,9 +87,7 @@ |
| 31 | + else { |
| 32 | + await pipeline(params.stream, writable); |
| 33 | + } |
| 34 | +- if (!handleClosedByStream) { |
| 35 | +- await handle.close().catch(() => undefined); |
| 36 | +- } |
| 37 | ++ await handle.close().catch(() => undefined); |
| 38 | + await fs.chmod(filePath, params.mode).catch(() => undefined); |
| 39 | + return { |
| 40 | + path: filePath, |
| 41 | +@@ -99,7 +97,7 @@ |
| 42 | + }; |
| 43 | + } |
| 44 | + catch (err) { |
| 45 | +- if (handle && !handleClosedByStream) { |
| 46 | ++ if (handle) { |
| 47 | + await handle.close().catch(() => undefined); |
| 48 | + } |
| 49 | + await fs.rm(dir, { recursive: true, force: true }).catch(() => undefined); |
| 50 | +diff --git a/dist/root-impl.js b/dist/root-impl.js |
| 51 | +index 7a1b2c0..9d3e4f5 100644 |
| 52 | +--- a/dist/root-impl.js |
| 53 | ++++ b/dist/root-impl.js |
| 54 | +@@ -1198,10 +1198,7 @@ |
| 55 | + }); |
| 56 | + await pipeline(sourceStream, targetStream); |
| 57 | + const writtenStat = await fs.stat(tempPath); |
| 58 | +- if (!tempClosedByStream) { |
| 59 | +- await tempHandle.close().catch(() => { }); |
| 60 | +- tempClosedByStream = true; |
| 61 | +- } |
| 62 | ++ await tempHandle.close().catch(() => { }); |
| 63 | + tempHandle = null; |
| 64 | + const commitTempPath = tempPath; |
| 65 | + await withAsyncDirectoryGuards([destinationGuard], async () => { |
| 66 | +@@ -1229,10 +1226,8 @@ |
| 67 | + throw err; |
| 68 | + } |
| 69 | + finally { |
| 70 | +- if (!sourceClosedByStream) { |
| 71 | +- await source.handle.close().catch(() => { }); |
| 72 | +- } |
| 73 | +- if (tempHandle && !tempClosedByStream) { |
| 74 | ++ await source.handle.close().catch(() => { }); |
| 75 | ++ if (tempHandle) { |
| 76 | + await tempHandle.close().catch(() => { }); |
| 77 | + } |
| 78 | + if (tempPath) { |
0 commit comments