From dffdaa4770bda5a318bc4eca65324ee22399c534 Mon Sep 17 00:00:00 2001 From: Glen Adams Date: Fri, 26 Jan 2024 10:49:42 -0500 Subject: [PATCH 1/2] fix symlinks --- packages/server/lib/services/filetree.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/lib/services/filetree.js b/packages/server/lib/services/filetree.js index 75223f74..9da42a29 100644 --- a/packages/server/lib/services/filetree.js +++ b/packages/server/lib/services/filetree.js @@ -103,13 +103,13 @@ filetree.updateDir = async function(dir) { if (initial) { // sync walk for performance initial = false; try { - entries = rrdir.sync(fullDir, {stats: true, exclude: cfg.ignorePatterns}); + entries = rrdir.sync(fullDir, {stats: true, exclude: cfg.ignorePatterns, followSymlinks: true}); } catch (err) { log.error(err); } } else { try { - entries = await rrdir.async(fullDir, {stats: true, exclude: cfg.ignorePatterns}); + entries = await rrdir.async(fullDir, {stats: true, exclude: cfg.ignorePatterns, followSymlinks: true}); } catch (err) { log.error(err); } From 6a9f951352476beded73204b7f9c9bbf9cf02bfa Mon Sep 17 00:00:00 2001 From: Glen Adams Date: Fri, 26 Jan 2024 12:02:16 -0500 Subject: [PATCH 2/2] utils.rmdir() use fs.rm(), works with symlinks. Req node 14.14.0 --- package.json | 2 +- packages/server/lib/services/utils.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8a68ec94..521e0c2b 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "preferGlobal": true, "private": true, "engines": { - "node": ">= 12.10.0" + "node": ">= 14.14.0" }, "scripts": { "build": "DROPPY_CACHE_PATH=$PWD/packages/cli/dist/cache.json lerna run --stream build --", diff --git a/packages/server/lib/services/utils.js b/packages/server/lib/services/utils.js index c1834dba..14f1b600 100644 --- a/packages/server/lib/services/utils.js +++ b/packages/server/lib/services/utils.js @@ -38,7 +38,7 @@ utils.rm = function(p, cb) { }; utils.rmdir = function(p, cb) { - fs.rmdir(p, {recursive: true}, cb); + fs.rm(p, {recursive: true}, cb); }; utils.move = function(src, dst, cb) {