Skip to content

Commit 748c5cf

Browse files
authored
fix crash and fix migration qqwry #161 (#162)
* fix crash #161 * fix migration qqwry
1 parent de355d1 commit 748c5cf

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

internal/migration/v7.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ func migration2v7() {
2828

2929
needOverwrite := false
3030
for _, adb := range dbList {
31-
if adb.Name == "qqwry" &&
32-
(adb.DownloadUrls[0] == "https://99wry.cf/qqwry.dat" ||
33-
strings.Contains(adb.DownloadUrls[0], "sspanel-uim")) {
34-
needOverwrite = true
35-
adb.DownloadUrls = qqwry.DownloadUrls
31+
if adb.Name == "qqwry" {
32+
if len(adb.DownloadUrls) == 0 ||
33+
adb.DownloadUrls[0] == "https://99wry.cf/qqwry.dat" ||
34+
strings.Contains(adb.DownloadUrls[0], "sspanel-uim") {
35+
needOverwrite = true
36+
adb.DownloadUrls = qqwry.DownloadUrls
37+
}
3638
}
3739
}
3840

0 commit comments

Comments
 (0)