From 70b98de4945f1b6bd0f92be049a36b90a0c23282 Mon Sep 17 00:00:00 2001 From: Ashok Pon Kumar Date: Wed, 2 Sep 2020 09:19:55 +0530 Subject: support file path in PlainOpenWithOptions - do only when detect flag is enabled --- repository.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'repository.go') diff --git a/repository.go b/repository.go index d954333..36fc1f5 100644 --- a/repository.go +++ b/repository.go @@ -281,7 +281,7 @@ func dotGitToOSFilesystems(path string, detect bool) (dot, wt billy.Filesystem, pathinfo, err := os.Stat(path) if !os.IsNotExist(err) { - if !pathinfo.IsDir() { + if !pathinfo.IsDir() && detect { path = filepath.Dir(path) } } -- cgit