Unverified Commit 6096e89e authored by SparkSnail's avatar SparkSnail Committed by GitHub
Browse files

Fix mkdir error (#2673)

parent 810efed3
......@@ -106,7 +106,9 @@ export async function execCopydir(source: string, destination: string): Promise<
const sourcePath = path.join(source, relPath);
const destPath = path.join(destination, relPath);
if (fs.statSync(sourcePath).isDirectory()) {
if (!fs.existsSync(destPath)) {
await fs.promises.mkdir(destPath);
}
} else {
await fs.promises.copyFile(sourcePath, destPath);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment