Skip to content
This repository was archived by the owner on Sep 26, 2020. It is now read-only.

Commit 21fa8b1

Browse files
TarmilKrzysztof-Cieslak
authored andcommitted
Fix #53: error when adding a file to a project with no files (#65)
1 parent 182db58 commit 21fa8b1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Forge.ProjectSystem/ProjectSystem.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,7 @@ type SourceTree (files:SourceFile list) =
505505
|> List.iter (fun (dir,files) ->
506506
tree.Add (dir,ResizeArray files)
507507
)
508+
if not (tree.ContainsKey "/") then tree.Add("/", ResizeArray())
508509

509510
/// Check if the target exists in the project file tree
510511
let hasTarget (target:string) =

0 commit comments

Comments
 (0)