Use create_dir_all
This commit is contained in:
parent
1bbc521893
commit
7df4117c7d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue