Use create_dir_all

This commit is contained in:
Niels Andriesse 2021-04-27 16:04:40 +10:00
parent 1bbc521893
commit 7df4117c7d
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ pub async fn store_file(
// Write to file
// room_id is guaranteed to be present at this point
let room_id = room_id.unwrap();
match std::fs::create_dir(format!("files/{}", &room_id)) {
match std::fs::create_dir_all(format!("files/{}", &room_id)) {
Ok(_) => (),
Err(e) => {
error!("Couldn't store file due to error: {}.", e);