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
Commits
b61dae36
Commit
b61dae36
authored
Sep 05, 2018
by
Kejie Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use file fullpath to judge file name
License: MIT Signed-off-by:
Kejie Zhang
<
601172892@qq.com
>
parent
19e3c127
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
core/commands/add.go
core/commands/add.go
+1
-1
core/coreunix/add.go
core/coreunix/add.go
+1
-1
No files found.
core/commands/add.go
View file @
b61dae36
...
...
@@ -117,7 +117,7 @@ You can now check what blocks have been created by:
cmdkit
.
BoolOption
(
trickleOptionName
,
"t"
,
"Use trickle-dag format for dag generation."
),
cmdkit
.
BoolOption
(
onlyHashOptionName
,
"n"
,
"Only chunk and hash - do not write to disk."
),
cmdkit
.
BoolOption
(
wrapOptionName
,
"w"
,
"Wrap files with a directory object."
),
cmdkit
.
StringOption
(
pathName
,
"Assign
path
name
when use wrap-with-directory option
"
),
cmdkit
.
StringOption
(
pathName
,
"Assign
a
name
if the file source is stdin.
"
),
cmdkit
.
BoolOption
(
hiddenOptionName
,
"H"
,
"Include files that are hidden. Only takes effect on recursive add."
),
cmdkit
.
StringOption
(
chunkerOptionName
,
"s"
,
"Chunking algorithm, size-[bytes] or rabin-[min]-[avg]-[max]"
)
.
WithDefault
(
"size-262144"
),
cmdkit
.
BoolOption
(
pinOptionName
,
"Pin this object when adding."
)
.
WithDefault
(
true
),
...
...
core/coreunix/add.go
View file @
b61dae36
...
...
@@ -472,7 +472,7 @@ func (adder *Adder) addFile(file files.File) error {
}
addFileName
:=
file
.
FileName
()
if
addFileName
==
""
&&
adder
.
Name
!=
""
{
if
(
file
.
FullPath
()
==
"/dev/stdin"
||
file
.
FullPath
()
==
""
)
&&
adder
.
Name
!=
""
{
addFileName
=
adder
.
Name
adder
.
Name
=
""
}
...
...
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