Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Rainbond
Commits
d4de19a1
Commit
d4de19a1
authored
3 years ago
by
yangk
Browse files
Options
Download
Email Patches
Plain Diff
Fix slice bounds out of range
parent
79fa5692
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
builder/exector/groupapp_restore.go
+5
-3
builder/exector/groupapp_restore.go
with
5 additions
and
3 deletions
+5
-3
builder/exector/groupapp_restore.go
+
5
-
3
View file @
d4de19a1
...
...
@@ -277,9 +277,11 @@ func (b *BackupAPPRestore) restoreVersionAndData(backup *dbmodel.AppBackup, appS
// before version 5.0.4, path name is pvc name, eg manual16-grcaa708-0
if
len
(
newNameTmp
)
==
3
{
newNameTmp
[
1
]
=
b
.
serviceChange
[
b
.
getOldServiceID
(
app
.
ServiceID
)]
.
ServiceAlias
oldVolumeID
,
_
:=
strconv
.
Atoi
(
newNameTmp
[
0
][
6
:
])
if
oldVolumeID
>
0
{
newNameTmp
[
0
]
=
fmt
.
Sprintf
(
"manual%d"
,
b
.
volumeIDMap
[
uint
(
oldVolumeID
)])
if
len
(
newNameTmp
[
0
])
>
6
{
oldVolumeID
,
_
:=
strconv
.
Atoi
(
newNameTmp
[
0
][
6
:
])
if
oldVolumeID
>
0
{
newNameTmp
[
0
]
=
fmt
.
Sprintf
(
"manual%d"
,
b
.
volumeIDMap
[
uint
(
oldVolumeID
)])
}
}
}
newName
:=
strings
.
Join
(
newNameTmp
,
"-"
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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