From 4b9b21b40f911e11dba5de9893d434f010f54c12 Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Mon, 4 Jan 2016 07:29:25 -0500 Subject: Remove unique_suffix function, not needed --- dotfiles.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'dotfiles.py') diff --git a/dotfiles.py b/dotfiles.py index e49a69b..18d49aa 100644 --- a/dotfiles.py +++ b/dotfiles.py @@ -9,11 +9,6 @@ DEFAULT_HOME = os.path.expanduser('~/') DEFAULT_REPO = os.path.expanduser('~/Dotfiles') -def unique_suffix(path_a, path_b): - discard = len(str(path_a.common(path_b))) + 1 - return (str(path_a)[discard:], str(path_b)[discard:]) - - class Repository(object): """A repository is a directory that contains dotfiles. @@ -58,8 +53,7 @@ class Dotfile(object): self.target = target def __str__(self): - short_name, _ = unique_suffix(self.name, self.target) - return '%s' % short_name + return self.name.basename def __repr__(self): return '' % self.name -- cgit v1.2.3