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-unixfs
Commits
96bed09b
Commit
96bed09b
authored
Jun 08, 2015
by
Tommi Virtanen
Committed by
Jeromy
Jan 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dagmodifier: Don't lose pin if old and new key happen to be equal
License: MIT Signed-off-by:
Jeromy
<
jeromyj@gmail.com
>
parent
1497d51f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
mod/dagmodifier.go
mod/dagmodifier.go
+3
-2
No files found.
mod/dagmodifier.go
View file @
96bed09b
...
...
@@ -209,9 +209,10 @@ func (dm *DagModifier) Sync() error {
dm
.
curNode
=
nd
}
// Finalize correct pinning, and flush pinner
dm
.
mp
.
PinWithMode
(
thisk
,
pin
.
Recursive
)
// Finalize correct pinning, and flush pinner
.
// Be careful about the order, as curk might equal thisk.
dm
.
mp
.
RemovePinWithMode
(
curk
,
pin
.
Recursive
)
dm
.
mp
.
PinWithMode
(
thisk
,
pin
.
Recursive
)
err
=
dm
.
mp
.
Flush
()
if
err
!=
nil
{
return
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