@lvce-editor/file-system-process 5.17.0 → 5.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +4 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1725,13 +1725,14 @@ const getFolderSizeInternal = async path => {
1725
1725
  }
1726
1726
  let total = 0;
1727
1727
  try {
1728
- const stats = await fs.stat(path);
1729
- total += stats.size;
1730
- if (stats.isDirectory() && !stats.isSymbolicLink()) {
1728
+ const stats = await fs.lstat(path);
1729
+ if (stats.isDirectory()) {
1731
1730
  const dirents = await fs.readdir(path);
1732
1731
  for (const dirent of dirents) {
1733
1732
  total += await getFolderSizeInternal(join(path, dirent));
1734
1733
  }
1734
+ } else {
1735
+ total += stats.size;
1735
1736
  }
1736
1737
  } catch {
1737
1738
  return 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-system-process",
3
- "version": "5.17.0",
3
+ "version": "5.17.1",
4
4
  "description": "File System Process",
5
5
  "keywords": [
6
6
  "Lvce Editor",