Converts a `raw_location`, which needn't exist, to its canonical form.
(&self, raw_location: &str)
| 409 | |
| 410 | /// Converts a `raw_location`, which needn't exist, to its canonical form. |
| 411 | pub fn make_canonical(&self, raw_location: &str) -> io::Result<String> { |
| 412 | let mut location = Location::new(raw_location)?; |
| 413 | if location.drive.is_none() { |
| 414 | location.drive = Some(self.current.clone()); |
| 415 | } |
| 416 | Ok(location.to_string()) |
| 417 | } |
| 418 | |
| 419 | /// Converts a `raw_location`, which needn't exist but must represent a file (not a directory), |
| 420 | /// to its canonical form. |