5076: Make VFS join methods fallible r=matklad a=jonas-schievink



Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
This commit is contained in:
bors[bot] 2020-06-26 14:37:15 +00:00 committed by GitHub
commit 4f60b4f2a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 9 deletions

View file

@ -209,7 +209,7 @@ impl GlobalStateSnapshot {
pub(crate) fn anchored_path(&self, file_id: FileId, path: &str) -> Url {
let mut base = self.vfs.read().0.file_path(file_id);
base.pop();
let path = base.join(path);
let path = base.join(path).unwrap();
let path = path.as_path().unwrap();
url_from_abs_path(&path)
}