mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-13 21:52:37 +00:00
revoke current path name
This commit is contained in:
parent
42e092b04a
commit
f39162dba9
1 changed files with 4 additions and 0 deletions
|
@ -51,6 +51,10 @@ impl Name {
|
|||
fn relative_path<T: AsRef<Path> + Clone>(&self, base_path: T) -> PathBuf {
|
||||
let base_path = base_path.as_ref();
|
||||
|
||||
if self.path == base_path {
|
||||
return PathBuf::from(AsRef::<Path>::as_ref(&Component::CurDir));
|
||||
}
|
||||
|
||||
let shared_components: PathBuf = self
|
||||
.path
|
||||
.components()
|
||||
|
|
Loading…
Reference in a new issue