From 9bdb95c9e34cef640534e5e5a1e2225a80442000 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期四, 09 六月 2022 15:48:15 +0800
Subject: [PATCH] TODO#139894 [ footer -最下方說明與保經代合作 ] 文案修改

---
 PAMapp/node_modules/memfs/lib/node.js |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/PAMapp/node_modules/memfs/lib/node.js b/PAMapp/node_modules/memfs/lib/node.js
index 6a7f91d..e49d127 100644
--- a/PAMapp/node_modules/memfs/lib/node.js
+++ b/PAMapp/node_modules/memfs/lib/node.js
@@ -223,16 +223,32 @@
         var _this = _super.call(this) || this;
         _this.children = {};
         // Path to this node as Array: ['usr', 'bin', 'node'].
-        _this.steps = [];
+        _this._steps = [];
         // "i-node" number of the node.
         _this.ino = 0;
         // Number of children.
         _this.length = 0;
         _this.vol = vol;
         _this.parent = parent;
-        _this.steps = parent ? parent.steps.concat([name]) : [name];
+        _this.name = name;
+        _this.syncSteps();
         return _this;
     }
+    Object.defineProperty(Link.prototype, "steps", {
+        get: function () {
+            return this._steps;
+        },
+        // Recursively sync children steps, e.g. in case of dir rename
+        set: function (val) {
+            this._steps = val;
+            for (var _i = 0, _a = Object.values(this.children); _i < _a.length; _i++) {
+                var child = _a[_i];
+                child === null || child === void 0 ? void 0 : child.syncSteps();
+            }
+        },
+        enumerable: false,
+        configurable: true
+    });
     Link.prototype.setNode = function (node) {
         this.node = node;
         this.ino = node.ino;
@@ -313,6 +329,9 @@
             children: Object.keys(this.children),
         };
     };
+    Link.prototype.syncSteps = function () {
+        this.steps = this.parent ? this.parent.steps.concat([this.name]) : [this.name];
+    };
     return Link;
 }(events_1.EventEmitter));
 exports.Link = Link;

--
Gitblit v1.8.0