Create posts file if it does not exist
This commit is contained in:
parent
56e7e0da17
commit
e67bfe9b58
@ -46,6 +46,7 @@ fn save_post(text: &str) {
|
||||
let mut file = OpenOptions::new()
|
||||
.write(true)
|
||||
.append(true)
|
||||
.create(true)
|
||||
.open("./Files/posts.json")
|
||||
.unwrap();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user