revoke current path name

This commit is contained in:
dvvvvvv 2020-02-04 22:31:17 +09:00 committed by Abin Simon
parent 42e092b04a
commit f39162dba9

View file

@ -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()