Fixed file writing mode

This commit is contained in:
Tristan B. Kildaire 2020-06-18 21:30:42 +02:00
parent 35eadbb165
commit 792b2382d6
1 changed files with 5 additions and 2 deletions

View File

@ -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` */
}