From f39162dba9c0dbf7875c2ebb774c2eae80593846 Mon Sep 17 00:00:00 2001 From: dvvvvvv Date: Tue, 4 Feb 2020 22:31:17 +0900 Subject: [PATCH] revoke current path name --- src/meta/name.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/meta/name.rs b/src/meta/name.rs index 943786b..ce431e4 100644 --- a/src/meta/name.rs +++ b/src/meta/name.rs @@ -51,6 +51,10 @@ impl Name { fn relative_path + Clone>(&self, base_path: T) -> PathBuf { let base_path = base_path.as_ref(); + if self.path == base_path { + return PathBuf::from(AsRef::::as_ref(&Component::CurDir)); + } + let shared_components: PathBuf = self .path .components()