diff --git a/src/nex.rs b/src/nex.rs index 7abf431..99c4db6 100644 --- a/src/nex.rs +++ b/src/nex.rs @@ -84,6 +84,8 @@ impl Nex { match source { Source::Url(url) => url, Source::File(from) => { + // attachments directory starts with dot in this implementation + // it is usually hidden but accessible in the servers like Nexy let d = format!(".{}", published.format(&self.filename)); let mut to = PathBuf::from(&p); to.push(&d); @@ -92,12 +94,16 @@ impl Nex { .file_name() .unwrap() .to_string_lossy() - .replace("post-", ""); + .replace("post-", ""); // cleanup extras from readable txt to.push(&f); if !to.exists() { fs::copy(&from, &to).unwrap(); + println!( + "\t\t\tcopy attachment file `{}`", + to.to_string_lossy() + ) } - format!("{d}/{f}") + format!("{d}/{f}") // relative URI } } ));