Create the directory if not exists

This commit is contained in:
tonitch authored and Debucquoy Anthony committed 2024-03-14 22:36:48 +01:00
1 parent c26972369f
commit 826bbf5990
1 file changed
+8
@@ -24,6 +24,14 @@ public class StorageService {
public StorageService(FileRepository filerepo){
this.fileRepo = filerepo;
if(!Files.exists(rootLocation)){
try {
Files.createDirectories(rootLocation);
} catch(IOException e){
e.printStackTrace();
}
}
}