diff options
| -rw-r--r-- | src/types.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/types.rs b/src/types.rs index be3f3ed..fef9071 100644 --- a/src/types.rs +++ b/src/types.rs @@ -25,6 +25,8 @@ pub struct SourceMetadata { impl AppImage { pub async fn save_to_index(&self, appname: &str) -> Result<(), Box<dyn std::error::Error>> { + fs::create_dir_all(&index_dir()).await?; + let index_file = &index_dir().join(format!("{appname}.json")); let json = serde_json::to_string_pretty(self)?; |
