master
Bel LaPointe 2024-08-08 13:17:32 -07:00
parent 52977ff0a7
commit a5f5013ef6
1 changed files with 11 additions and 1 deletions

View File

@ -160,7 +160,17 @@ impl DB {
.filter(|tasks_and_metadata| tasks_and_metadata.file.ends_with(format!("/{}", base).as_str()))
.nth(0) {
Some(set) => set.clone(),
None => TasksAndMetadata::new_with(base, TS::now(), Tasks::new()),
None => TasksAndMetadata::new_with(
format!("{}/{}",
std::path::Path::new(self.0[0].file.as_str())
.parent().expect("root?")
.display()
.to_string(),
base,
),
TS::now(),
Tasks::new(),
),
};
let edited = TasksAndMetadata::new(f.display().to_string()).expect("failed to read edited tasks");