Skip to content

Commit

Permalink
don't forward empty paths
Browse files Browse the repository at this point in the history
  • Loading branch information
bertiqwerty committed May 6, 2024
1 parent 6193f69 commit 9930632
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rvimage/src/rvlib/file_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ pub struct PathPair {
impl PathPair {
pub fn new(path_absolute: String, prj_path: &Path) -> Self {
let path_absolute = path_absolute.replace('\\', "/");
let path_relative = tf_to_annomap_key(path_absolute.clone(), Some(prj_path));
let prj_path = if prj_path == Path::new("") {
None
} else {
Some(prj_path)
};
let path_relative = tf_to_annomap_key(path_absolute.clone(), prj_path);
PathPair {
path_absolute,
path_relative,
Expand Down

0 comments on commit 9930632

Please sign in to comment.