mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-23 18:58:50 -06:00
file.MyDir() must return directory of caller
It was returning the directory in which the library code lives. Whoops.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user