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
a7dbfb26
Commit
a7dbfb26
authored
Apr 09, 2020
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: close query when finished moving
parent
2284a522
Changes
1
Show 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 @
a7dbfb26
...
@@ -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