From 4e388621866fb75afab48c72b87f344645ba80c6 Mon Sep 17 00:00:00 2001 From: Chris Masone Date: Mon, 21 Dec 2015 13:50:02 -0800 Subject: [PATCH] file.MyDir() must return directory of caller It was returning the directory in which the library code lives. Whoops. --- tools/file/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/file/file.go b/tools/file/file.go index c69a9be161..d11fc49aff 100644 --- a/tools/file/file.go +++ b/tools/file/file.go @@ -25,7 +25,7 @@ func DumbCopy(srcPath, dstPath string) { // MyDir returns the directory in which the file containing the calling source code resides. func MyDir() string { - _, path, _, ok := runtime.Caller(0) + _, path, _, ok := runtime.Caller(1) d.Chk.True(ok, "Should have been able to get Caller.") return filepath.Dir(path) }