diff --git a/package.json b/package.json index 9e8d540..ce5f036 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fwdekker.com", - "version": "0.38.2", + "version": "0.38.3", "description": "The source code of [my personal website](https://fwdekker.com/).", "author": "Felix W. Dekker", "browser": "dist/bundle.js", diff --git a/src/main/js/FileSystem.ts b/src/main/js/FileSystem.ts index 5a763cb..7708a7a 100644 --- a/src/main/js/FileSystem.ts +++ b/src/main/js/FileSystem.ts @@ -90,7 +90,9 @@ export class FileSystem { "password.txt": new File("root: g9PjKu"), }), }); - (this.get(new Path("home", "felix")) as Directory).addAll(FileSystem.navRoot); + + const home = this.get(new Path("home", "felix")) as Directory; + Object.keys(FileSystem.navRoot.nodes).forEach(name => home.add(name, FileSystem.navRoot.get(name)!)); } @@ -577,15 +579,6 @@ export class Directory extends Node { this._nodes[name] = node; } - /** - * Adds (references to) all files in the given directory to this directory. - * - * @param directory the directory of which to add the children to this directory - */ - addAll(directory: Directory): void { - Object.keys(directory.nodes).forEach(name => this.add(name, directory.get(name)!)); - } - /** * Removes the node with the given name. *