From d78036fe24c9c746d3513f9e97f463f995aef0fd Mon Sep 17 00:00:00 2001 From: Jesse Ezell Date: Thu, 20 Mar 2014 22:54:18 -0700 Subject: refactor and cleanup code --- git_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'git_test.go') diff --git a/git_test.go b/git_test.go index e6372fb..6a3aeaa 100644 --- a/git_test.go +++ b/git_test.go @@ -2,6 +2,7 @@ package git import ( "io/ioutil" + "path" "testing" "time" ) @@ -66,7 +67,7 @@ func updateReadme(t *testing.T, repo *Repository, content string) (*Oid, *Oid) { } tmpfile := "README" - err = ioutil.WriteFile(repo.Path()+"/"+tmpfile, []byte(content), 0644) + err = ioutil.WriteFile(path.Join(path.Dir(path.Dir(repo.Path())), tmpfile), []byte(content), 0644) checkFatal(t, err) idx, err := repo.Index() -- cgit v1.2.3