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
44027013
Commit
44027013
authored
Mar 16, 2020
by
Peter Rabbitson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Special-case accepting explicitly supplied named pipes
parent
bde31bba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
CHANGELOG.md
CHANGELOG.md
+2
-0
cli/parse.go
cli/parse.go
+11
-2
No files found.
CHANGELOG.md
View file @
44027013
# go-ipfs changelog
-
Accept named fifos ( pipes ) when supplied directly as an argument, continues to reject them when encountered recursively
-
Require Go 1.14
-
Remove gx
### 0.4.4 - 2016-10-11
...
...
cli/parse.go
View file @
44027013
...
...
@@ -11,8 +11,8 @@ import (
"strings"
osh
"github.com/Kubuxu/go-os-helper"
"github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/go-ipfs-files"
cmds
"github.com/ipfs/go-ipfs-cmds"
files
"github.com/ipfs/go-ipfs-files"
logging
"github.com/ipfs/go-log"
)
...
...
@@ -510,6 +510,15 @@ func appendFile(fpath string, argDef *cmds.Argument, recursive, hidden bool) (fi
if
!
recursive
{
return
nil
,
fmt
.
Errorf
(
notRecursiveFmtStr
,
fpath
,
cmds
.
RecShort
)
}
}
else
if
(
stat
.
Mode
()
&
os
.
ModeNamedPipe
)
!=
0
{
// Special case pipes that are provided directly on the command line
// We do this here instead of go-ipfs-files, as we need to differentiate between
// recursive(unsupported) and direct(supported) mode
file
,
err
:=
os
.
Open
(
fpath
)
if
err
!=
nil
{
return
nil
,
err
}
return
files
.
NewReaderPathFile
(
fpath
,
file
,
stat
)
}
return
files
.
NewSerialFile
(
fpath
,
hidden
,
stat
)
...
...
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