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 10
10
//! file paths. In the current implementation, the `arguments` attribute is not
11
11
//! transformed.
12
12
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 ;
16
16
17
17
#[ derive( Default , Debug ) ]
18
18
pub enum PathFormatter {
@@ -62,6 +62,8 @@ impl TryFrom<&config::PathFormat> for PathFormatter {
62
62
63
63
/// Compute the absolute path from the root directory if the path is relative.
64
64
fn 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.
65
67
if path. is_absolute ( ) {
66
68
Ok ( path. canonicalize ( ) ?)
67
69
} else {
You can’t perform that action at this time.
0 commit comments