@@ -176,17 +176,13 @@ async function syncSymlink(src, dst, sandbox, exists) {
176
176
return 1
177
177
}
178
178
179
- async function syncDirectory ( src , dst , sandbox , exists , writePerm ) {
179
+ async function syncDirectory ( src , dst , sandbox , writePerm ) {
180
180
if ( process . env . JS_BINARY__LOG_DEBUG ) {
181
181
console . error (
182
182
`Syncing directory ${ src . slice ( RUNFILES_ROOT . length + 1 ) } ...`
183
183
)
184
184
}
185
185
const contents = await fs . promises . readdir ( src )
186
- if ( ! exists ) {
187
- // Intentionally synchronous; see comment on mkdirpSync
188
- mkdirpSync ( dst )
189
- }
190
186
return (
191
187
await Promise . all (
192
188
contents . map (
@@ -264,7 +260,7 @@ async function syncRecursive(src, dst, sandbox, writePerm) {
264
260
if ( lstat . isSymbolicLink ( ) ) {
265
261
return syncSymlink ( src , dst , sandbox , exists )
266
262
} else if ( lstat . isDirectory ( ) ) {
267
- return syncDirectory ( src , dst , sandbox , exists , writePerm )
263
+ return syncDirectory ( src , dst , sandbox , writePerm )
268
264
} else {
269
265
const lastChecksum = syncedChecksum . get ( src )
270
266
const checksum = await generateChecksum ( src )
@@ -718,7 +714,7 @@ async function cycleSyncRecurse(cycle, src, dst, sandbox, writePerm) {
718
714
}
719
715
720
716
if ( isDirectory ) {
721
- return syncDirectory ( src , dst , sandbox , exists , writePerm )
717
+ return syncDirectory ( src , dst , sandbox , writePerm )
722
718
} else {
723
719
return syncFile ( src , dst , exists , lstat , writePerm )
724
720
}
0 commit comments