We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19c87c6 commit 9825c6aCopy full SHA for 9825c6a
data/placeholder.txt
src/main/java/duke/Storage.java
@@ -26,7 +26,9 @@ public class Storage {
26
public Storage(String fileLocation) throws DukeException {
27
try {
28
dukeFile = new File(fileLocation);
29
- dukeFile.createNewFile();
+ if (dukeFile.getParentFile().mkdir()) {
30
+ dukeFile.createNewFile();
31
+ }
32
} catch (IOException e) {
33
throw new StorageException(e.getMessage());
34
}
0 commit comments