From 792b2382d64528615dcb209cc887dfe9bd44b9f0 Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Thu, 18 Jun 2020 21:30:42 +0200 Subject: [PATCH] Fixed file writing mode --- source/client/mail.d | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/client/mail.d b/source/client/mail.d index 3d367a9..c3d01ab 100644 --- a/source/client/mail.d +++ b/source/client/mail.d @@ -90,8 +90,11 @@ public final class Mailbox public void storeMessage(Folder folder, string mailID, JSONValue mailBlock) { /* TODO: Traverse the folder path */ - string kaka; - string filename = folder.folderPath~kaka; + string filename = "mailboxes/"~username~"/"~folder.folderPath~"/"~mailID; + + File mailFile; + mailFile.open(filename, "wb"); + mailFile.rawWrite(cast(byte[])toJSON(mailBlock)); /* TODO: Store the message in file `filename` */ }