represent the current_dir as an absolute path, not a relative one. (#262)
This commit is contained in:
@@ -193,8 +193,11 @@ impl SubModuleUser for IndexStore {
|
||||
|
||||
#[inline]
|
||||
fn current_dir() -> std::path::PathBuf {
|
||||
let mut path_buf = std::path::PathBuf::from(file!());
|
||||
path_buf.pop();
|
||||
let mut path_buf = std::path::PathBuf::from(PROJECT_DIR);
|
||||
// file!() always produces a path relative to PROJECT_DIR.
|
||||
path_buf = path_buf.join(std::path::PathBuf::from(file!()));
|
||||
|
||||
path_buf.pop();
|
||||
path_buf
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user