A file-based task manager

use symlinks instead of hardlinks

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