Skip to content

Commit

Permalink
fixed recursive folder creation during staging path transfer
Browse files Browse the repository at this point in the history
fs-extra's recursive directory creation is not reliable; now using
fs.ensureDirWritableAsync which is "battle" proven.

fixes #16710
  • Loading branch information
IDCs committed Nov 28, 2024
1 parent ae314a5 commit 8c62915
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/transferPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export function transferPath(source: string,
const destPath = path.join(dest, path.relative(source, entry.filePath));
return isCancelled
? Promise.reject(new UserCanceled())
: fs.mkdirsAsync(destPath).catch(err => (err.code === 'EEXIST')
: fs.ensureDirWritableAsync(destPath).catch(err => (err.code === 'EEXIST')
? Promise.resolve()
: Promise.reject(err));
})
Expand Down

0 comments on commit 8c62915

Please sign in to comment.