A file-based task manager

use symlinks instead of hardlinks

+3 -2
+3 -2
src/workspace.rs
··· 6 use crate::{fzf, util}; 7 use std::collections::vec_deque; 8 use std::fmt::Display; 9 - use std::fs::{self, File}; 10 use std::io::{BufRead as _, BufReader, Read, Seek, SeekFrom}; 11 use std::path::PathBuf; 12 use std::str::FromStr; 13 use std::{fs::OpenOptions, io::Write}; ··· 130 let mut file = util::flopen(task_path.clone(), FlockArg::LockExclusive)?; 131 file.write_all(format!("{title}\n\n{body}").as_bytes())?; 132 // create a hardlink to the task dir to mark it as "open" 133 - fs::hard_link( 134 task_path, 135 self.path.join("tasks").join(format!("tsk-{}.tsk", id.0)), 136 )?;
··· 6 use crate::{fzf, util}; 7 use std::collections::vec_deque; 8 use std::fmt::Display; 9 + use std::fs::File; 10 use std::io::{BufRead as _, BufReader, Read, Seek, SeekFrom}; 11 + use std::os::unix::fs::symlink; 12 use std::path::PathBuf; 13 use std::str::FromStr; 14 use std::{fs::OpenOptions, io::Write}; ··· 131 let mut file = util::flopen(task_path.clone(), FlockArg::LockExclusive)?; 132 file.write_all(format!("{title}\n\n{body}").as_bytes())?; 133 // create a hardlink to the task dir to mark it as "open" 134 + symlink( 135 task_path, 136 self.path.join("tasks").join(format!("tsk-{}.tsk", id.0)), 137 )?;