kblincoe / VisualGit_SE701_2019_4

1 stars 0 forks source link

Text editor opens file using filename appending to cwd #159

Closed YichenTang97 closed 5 years ago

YichenTang97 commented 5 years ago

This issue is related to PR #157 soling issue #48.

Observed behaviour:

image

Expected behaviour:

File can be editted with no problem.

Steps to reproduce:

  1. npm start
  2. choose either sign in or continue without sign in
  3. open a local repository that is not the current VisualGit repository
  4. create a new text file
  5. wait until the file show up on the file panel and click on the file
  6. the error would be logged in the console

Reason:

The filepath passed into diff-service.ts which further used in edit.panel.component.ts is just the file name, thus, when fs tries to open the file, it append the filename onto the current working directory.