Canonicalize the path on open to avoid duplicates.

pull/11/head
Blaž Hrastnik 4 years ago
parent 7c915dc065
commit 418ee17b86

@ -119,6 +119,8 @@ impl Editor {
}
pub fn open(&mut self, path: PathBuf, action: Action) -> Result<DocumentId, Error> {
let path = std::fs::canonicalize(path)?;
let id = self
.documents()
.find(|doc| doc.path() == Some(&path))

Loading…
Cancel
Save