Skip to content

Commit

Permalink
chore: cleanup file-tree and add header
Browse files Browse the repository at this point in the history
  • Loading branch information
TimBeyer committed Aug 18, 2023
1 parent e1360e0 commit d256c3b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions core/src/vcs/file-tree.ts
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"

Expand All @@ -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
}

Expand All @@ -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
Expand Down

0 comments on commit d256c3b

Please sign in to comment.