Fix site cloning into reserved directories on Node 24
DC CMS qualification / qualify (push) Successful in 1m34s
DC CMS qualification / qualify (push) Successful in 1m34s
This commit is contained in:
@@ -87,7 +87,10 @@ async function createSite(payload) {
|
||||
await mkdir(root); // Reservation: never overwrite an existing tree.
|
||||
source.writes++;
|
||||
try {
|
||||
await cp(source.root, root, {
|
||||
if ((await lstat(source.root)).isSymbolicLink()) throw fail("Копирование сайта с символическими ссылками не поддерживается");
|
||||
// The destination root is our reservation. Node 24 rejects cp onto an
|
||||
// existing directory with errorOnExist, so copy its children separately.
|
||||
for (const entry of await readdir(source.root)) await cp(join(source.root, entry), join(root, entry), {
|
||||
recursive: true, force: false, errorOnExist: true,
|
||||
filter: async path => {
|
||||
const parts = relative(source.root, path).split(/[\\/]/);
|
||||
|
||||
Reference in New Issue
Block a user