Skip to content

Commit

Permalink
Bug fix - accidental delete in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexCQY committed Sep 5, 2020
1 parent d70155b commit 320d061
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/duke/Storage.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class Storage {

private String filepath;
private Parser parser;
private File file;

/**
* Constructor for instantiating a Storage
Expand All @@ -28,7 +29,7 @@ public Storage(String filepath) {


private void createNewTextFileCalledTask() {
File file = new File(filepath);
file = new File(filepath);
try {
if (file.createNewFile()) {
System.out.print("File created");
Expand Down Expand Up @@ -72,7 +73,7 @@ public void saveTaskContents(List<Task> lstOfTask) {
*/
public void populateToLstOfTask(List<Task> lstOfTask) throws IOException {

File file = new File("Tasks.txt");
createNewTextFileCalledTask();

BufferedReader br = new BufferedReader(new FileReader(file));

Expand Down

0 comments on commit 320d061

Please sign in to comment.