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
167532c2
Commit
167532c2
authored
Sep 02, 2015
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix direct symlink adding
License: MIT Signed-off-by:
Jeromy
<
jeromyj@gmail.com
>
parent
4bcacc59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
commands/cli/parse.go
commands/cli/parse.go
+12
-3
No files found.
commands/cli/parse.go
View file @
167532c2
...
...
@@ -351,13 +351,22 @@ func appendFile(args []files.File, inputs []string, argDef *cmds.Argument, recur
}
fpath
=
cwd
}
file
,
err
:=
os
.
Open
(
fpath
)
stat
,
err
:=
os
.
Lstat
(
fpath
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
stat
,
err
:=
file
.
Stat
()
if
stat
.
Mode
()
&
os
.
ModeSymlink
!=
0
{
target
,
err
:=
os
.
Readlink
(
fpath
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
arg
:=
files
.
NewLinkFile
(
""
,
fpath
,
target
,
stat
)
return
append
(
args
,
arg
),
inputs
[
1
:
],
nil
}
file
,
err
:=
os
.
Open
(
fpath
)
if
err
!=
nil
{
return
nil
,
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