From d14736dbfe9da1ef64c38d4184247d0a72dd9074 Mon Sep 17 00:00:00 2001 From: David Knaack Date: Sun, 14 Feb 2021 18:15:47 +0100 Subject: [PATCH] fix(directory): contract git repo with display path (#2304) --- src/modules/directory.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/modules/directory.rs b/src/modules/directory.rs index 67cc0996..9b154a82 100644 --- a/src/modules/directory.rs +++ b/src/modules/directory.rs @@ -58,10 +58,7 @@ pub fn module<'a>(context: &'a Context) -> Option> { let dir_string = repo .and_then(|r| r.root.as_ref()) .filter(|root| *root != &home_dir) - // NOTE: Always attempt to contract repo paths from the physical dir as - // the logical dir _may_ not be be a valid physical disk - // path and may be impossible to contract. - .and_then(|root| contract_repo_path(&physical_dir, root)); + .and_then(|root| contract_repo_path(&display_dir, root)); // Otherwise use the logical path, automatically contracting // the home directory if required.