File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
rust/bear/src/semantic/transformation Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1010//! file paths. In the current implementation, the `arguments` attribute is not
1111//! transformed.
1212
13- use super :: * ;
14- use std:: env;
15- use std :: path ;
13+ use crate :: { config , semantic } ;
14+ use std:: { env, io , path } ;
15+ use thiserror :: Error ;
1616
1717#[ derive( Default , Debug ) ]
1818pub enum PathFormatter {
@@ -62,6 +62,8 @@ impl TryFrom<&config::PathFormat> for PathFormatter {
6262
6363/// Compute the absolute path from the root directory if the path is relative.
6464fn absolute_to ( root : & path:: Path , path : & path:: Path ) -> Result < path:: PathBuf , Error > {
65+ // TODO: instead of calling `canonicalize` on the path, we should use
66+ // `path::absolute` when the filesystem access is not allowed.
6567 if path. is_absolute ( ) {
6668 Ok ( path. canonicalize ( ) ?)
6769 } else {
You can’t perform that action at this time.
0 commit comments