Unverified Commit 993e4d39 authored by Shiro Wang's avatar Shiro Wang Committed by GitHub

Fix: the unexpected clearing of symbolic link directories (#82191)

When I was using the standalone build, the second build would delete the
contents of local packages. As a result, developers had to delete the
cache of local empty directories and re-download the packages. I added a
condition for recursive deletion to avoid this situation.

Fixes #82157
parent 7351d924
---
'next': patch
---
Fix the unexpected clearing of symbolic link directories
......@@ -79,7 +79,7 @@ export async function recursiveDelete(
const isNotExcluded = !exclude || !exclude.test(pp)
if (isNotExcluded) {
if (isDirectory) {
if (!isSymlink && isDirectory) {
await recursiveDelete(absolutePath, exclude, pp)
}
return unlinkPath(absolutePath, !isSymlink && isDirectory)
......
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