@@ -708,7 +708,7 @@ impl Document {
708708 let mut doc = Self::from(rope, Some((encoding, has_bom)), config);
709709
710710 // set the path and try detecting the language
711− doc.set_path(Some(path))?;
711+ doc.set_path(Some(path));
712712 if let Some(loader) = config_loader {
713713 doc.detect_language(loader);
714714 }
@@ -853,7 +853,7 @@ impl Document {
853853 let text = self.text().clone();
854854
855855 let path = match path {
856− Some(path) => helix_core::path::get_canonicalized_path(&path)?,
856+ Some(path) => helix_core::path::get_canonicalized_path(&path),
857857 None => {
858858 if self.path.is_none() {
859859 bail!("Can't save with no path set!");
@@ -1047,18 +1047,14 @@ impl Document {
10471047 self.encoding
10481048 }
10491049
1050− pub fn set_path(&mut self, path: Option<&Path>) -> Result<(), std::io::Error> {
1051− let path = path
1052− .map(helix_core::path::get_canonicalized_path)
1053− .transpose()?;
1050+ pub fn set_path(&mut self, path: Option<&Path>) {
1051+ let path = path.map(helix_core::path::get_canonicalized_path);
10541052
10551053 // if parent doesn't exist we still want to open the document
10561054 // and error out when document is saved
10571055 self.path = path;
10581056
10591057 self.detect_readonly();
1060−
1061− Ok(())
10621058 }
10631059
10641060 /// Set the programming language for the file and load associated data (e.g. highlighting)