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< ...@@ -106,7 +106,9 @@ export async function execCopydir(source: string, destination: string): Promise<
const sourcePath = path.join(source, relPath); const sourcePath = path.join(source, relPath);
const destPath = path.join(destination, relPath); const destPath = path.join(destination, relPath);
if (fs.statSync(sourcePath).isDirectory()) { if (fs.statSync(sourcePath).isDirectory()) {
await fs.promises.mkdir(destPath); if (!fs.existsSync(destPath)) {
await fs.promises.mkdir(destPath);
}
} else { } else {
await fs.promises.copyFile(sourcePath, destPath); 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