Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-unixfs
Commits
76202a94
Commit
76202a94
authored
Jan 13, 2015
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(repo): clean the path before using it
no issue detected but it's good to be safe
parent
40e41d24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
repo/fsrepo/fsrepo.go
repo/fsrepo/fsrepo.go
+3
-2
No files found.
repo/fsrepo/fsrepo.go
View file @
76202a94
...
...
@@ -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
(
p
ath
string
)
*
FSRepo
{
func
At
(
repoP
ath
string
)
*
FSRepo
{
// This method must not have side-effects.
return
&
FSRepo
{
path
:
path
,
path
:
path
.
Clean
(
repoPath
)
,
state
:
unopened
,
// explicitly set for clarity
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment