diff --git a/data/placeholder.txt b/data/placeholder.txt deleted file mode 100644 index 8d1d542395..0000000000 --- a/data/placeholder.txt +++ /dev/null @@ -1 +0,0 @@ -nothing to see here \ No newline at end of file diff --git a/src/main/java/duke/Storage.java b/src/main/java/duke/Storage.java index 2d1fc10f30..1be81121de 100644 --- a/src/main/java/duke/Storage.java +++ b/src/main/java/duke/Storage.java @@ -26,7 +26,9 @@ public class Storage { public Storage(String fileLocation) throws DukeException { try { dukeFile = new File(fileLocation); - dukeFile.createNewFile(); + if (dukeFile.getParentFile().mkdir()) { + dukeFile.createNewFile(); + } } catch (IOException e) { throw new StorageException(e.getMessage()); }