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-ds-flatfs
Commits
8a9ada91
Unverified
Commit
8a9ada91
authored
Apr 09, 2020
by
Steven Allen
Committed by
GitHub
Apr 09, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #74 from ipfs/fix/close-query-on-move
fix: close query when finished moving
parents
8e4cd220
a7dbfb26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
convert.go
convert.go
+3
-0
No files found.
convert.go
View file @
8a9ada91
...
@@ -76,11 +76,13 @@ func Move(oldPath string, newPath string, out io.Writer) error {
...
@@ -76,11 +76,13 @@ func Move(oldPath string, newPath string, out io.Writer) error {
break
break
}
}
if
e
.
Error
!=
nil
{
if
e
.
Error
!=
nil
{
res
.
Close
()
return
e
.
Error
return
e
.
Error
}
}
err
:=
moveKey
(
oldDS
,
newDS
,
datastore
.
RawKey
(
e
.
Key
))
err
:=
moveKey
(
oldDS
,
newDS
,
datastore
.
RawKey
(
e
.
Key
))
if
err
!=
nil
{
if
err
!=
nil
{
res
.
Close
()
return
err
return
err
}
}
...
@@ -89,6 +91,7 @@ func Move(oldPath string, newPath string, out io.Writer) error {
...
@@ -89,6 +91,7 @@ func Move(oldPath string, newPath string, out io.Writer) error {
fmt
.
Fprintf
(
out
,
"
\r
%d keys so far"
,
count
)
fmt
.
Fprintf
(
out
,
"
\r
%d keys so far"
,
count
)
}
}
}
}
res
.
Close
()
if
out
!=
nil
{
if
out
!=
nil
{
fmt
.
Fprintf
(
out
,
"
\n
Cleaning Up...
\n
"
)
fmt
.
Fprintf
(
out
,
"
\n
Cleaning Up...
\n
"
)
...
...
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