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-dms3-cmds
Commits
4819a1cb
Commit
4819a1cb
authored
Nov 17, 2014
by
Matt Bell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands/cli: Use filepath.Join for file path building
parent
75b5d275
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
cli/parse.go
cli/parse.go
+2
-1
No files found.
cli/parse.go
View file @
4819a1cb
...
...
@@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"os"
fp
"path/filepath"
"strings"
cmds
"github.com/jbenet/go-ipfs/commands"
...
...
@@ -281,7 +282,7 @@ func getFile(file *os.File, path string) (cmds.File, error) {
files
:=
make
([]
cmds
.
File
,
0
,
len
(
contents
))
for
_
,
child
:=
range
contents
{
childPath
:=
f
mt
.
Sprintf
(
"%s/%s"
,
path
,
child
.
Name
())
childPath
:=
f
p
.
Join
(
path
,
child
.
Name
())
childFile
,
err
:=
os
.
Open
(
childPath
)
if
err
!=
nil
{
return
nil
,
err
...
...
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