summaryrefslogtreecommitdiff
path: root/back-end/src/StorageExtensions.cs
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-12-08 20:52:04 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2023-12-08 20:52:04 -0500
commitb564708f29cf8a709c3e3d981477b2ec8440673e (patch)
treeb5eb4b728111fb7746b08a0b6231deab63a2960f /back-end/src/StorageExtensions.cs
parentfdf78dd5bf25f345cc8419cc547cdbafaf54ae86 (diff)
patch and close issue #2 for empty/non existent index files
Diffstat (limited to 'back-end/src/StorageExtensions.cs')
-rw-r--r--back-end/src/StorageExtensions.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/back-end/src/StorageExtensions.cs b/back-end/src/StorageExtensions.cs
index 8acb26e..3227585 100644
--- a/back-end/src/StorageExtensions.cs
+++ b/back-end/src/StorageExtensions.cs
@@ -170,10 +170,11 @@ namespace Content.Publishing.Blog.Admin
//Mem stream to read the object into
using VnMemoryStream ms = new();
- await storage.ReadFileAsync(objPath, ms, cancellation);
-
- //Load the db from the stream
- db.Load(ms);
+ if(await storage.ReadFileAsync(objPath, ms, cancellation) > 0)
+ {
+ //Load the db from the stream
+ db.Load(ms);
+ }
}
}