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
e9d6c060
Commit
e9d6c060
authored
Oct 16, 2018
by
Overbool
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(files): add slash for dir
License: MIT Signed-off-by:
Overbool
<
overbool.xu@gmail.com
>
parent
9bf4e414
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
core/commands/files.go
core/commands/files.go
+4
-1
No files found.
core/commands/files.go
View file @
e9d6c060
...
...
@@ -479,7 +479,7 @@ Examples:
return
case
*
mfs
.
File
:
_
,
name
:=
gopath
.
Split
(
path
)
out
:=
&
filesLsOutput
{[]
mfs
.
NodeListing
{
mfs
.
NodeListing
{
Name
:
name
}}}
out
:=
&
filesLsOutput
{[]
mfs
.
NodeListing
{{
Name
:
name
}}}
if
long
{
out
.
Entries
[
0
]
.
Type
=
int
(
fsn
.
Type
())
...
...
@@ -527,6 +527,9 @@ Examples:
long
,
_
,
_
:=
res
.
Request
()
.
Option
(
longOptionName
)
.
Bool
()
for
_
,
o
:=
range
out
.
Entries
{
if
long
{
if
o
.
Type
==
int
(
mfs
.
TDir
)
{
o
.
Name
+=
"/"
}
fmt
.
Fprintf
(
buf
,
"%s
\t
%s
\t
%d
\n
"
,
o
.
Name
,
o
.
Hash
,
o
.
Size
)
}
else
{
fmt
.
Fprintf
(
buf
,
"%s
\n
"
,
o
.
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