summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/util/backup/incremental
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/util/backup/incremental')
-rw-r--r--src/main/java/com/keuin/kbackupfabric/util/backup/incremental/manager/IncrementalBackupStorageManager.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/util/backup/incremental/manager/IncrementalBackupStorageManager.java b/src/main/java/com/keuin/kbackupfabric/util/backup/incremental/manager/IncrementalBackupStorageManager.java
index a4271c6..6c359c6 100644
--- a/src/main/java/com/keuin/kbackupfabric/util/backup/incremental/manager/IncrementalBackupStorageManager.java
+++ b/src/main/java/com/keuin/kbackupfabric/util/backup/incremental/manager/IncrementalBackupStorageManager.java
@@ -30,6 +30,10 @@ public class IncrementalBackupStorageManager {
* @throws IOException I/O Error.
*/
public int addObjectCollection(ObjectCollection collection, File collectionBasePath) throws IOException {
+ if (!backupStorageBase.toFile().isDirectory()) {
+ if (!backupStorageBase.toFile().mkdirs())
+ throw new IOException("Backup storage base directory does not exist, and failed to create it.");
+ }
Objects.requireNonNull(collection);
Objects.requireNonNull(collectionBasePath);