Commit c28944ce authored by Jeromy's avatar Jeromy

have repo tilde expand paths

parent 188c37e2
......@@ -16,6 +16,7 @@ import (
lockfile "github.com/jbenet/go-ipfs/repo/fsrepo/lock"
serialize "github.com/jbenet/go-ipfs/repo/fsrepo/serialize"
dir "github.com/jbenet/go-ipfs/thirdparty/dir"
u "github.com/jbenet/go-ipfs/util"
debugerror "github.com/jbenet/go-ipfs/util/debugerror"
)
......@@ -145,6 +146,12 @@ func (r *FSRepo) Open() error {
packageLock.Lock()
defer packageLock.Unlock()
expPath, err := u.TildeExpansion(r.path)
if err != nil {
return err
}
r.path = expPath
if r.state != unopened {
return debugerror.Errorf("repo is %s", r.state)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment