Commit 76202a94 authored by Brian Tiger Chow's avatar Brian Tiger Chow

fix(repo): clean the path before using it

no issue detected but it's good to be safe
parent 40e41d24
......@@ -5,6 +5,7 @@ import (
"fmt"
"io"
"os"
"path"
"path/filepath"
repo "github.com/jbenet/go-ipfs/repo"
......@@ -42,10 +43,10 @@ type FSRepo struct {
}
// At returns a handle to an FSRepo at the provided |path|.
func At(path string) *FSRepo {
func At(repoPath string) *FSRepo {
// This method must not have side-effects.
return &FSRepo{
path: path,
path: path.Clean(repoPath),
state: unopened, // explicitly set for clarity
}
}
......
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