-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: cleanup file-tree and add header
- Loading branch information
Showing
1 changed file
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
/* | ||
* Copyright (C) 2018-2023 Garden Technologies, Inc. <[email protected]> | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
import { VcsFile } from "./vcs" | ||
import * as path from "path" | ||
|
||
|
@@ -15,9 +23,7 @@ export class FileTreeNode { | |
} | ||
|
||
addFile(file: VcsFile): boolean { | ||
// console.log(`Adding file ${file.path} at path ${this.ownPath}`) | ||
if (!file.path.startsWith(`/${this.ownPath}`)) { | ||
// console.log(`File ${file.path} is not a child of ${this.ownPath}`) | ||
return false | ||
} | ||
|
||
|
@@ -42,8 +48,6 @@ export class FileTreeNode { | |
child = this.childrenBySubpath.get(subpathSegment)! | ||
} | ||
|
||
// console.log(`Adding file ${file.path} to child at path ${subpathSegment}`) | ||
|
||
child.addFile(file) | ||
|
||
return true | ||
|