]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Fix 录播目录忽略可能导致panic的文件
authorqydysky <32743305+qydysky@users.noreply.github.com>
Sat, 11 Feb 2023 14:02:57 +0000 (22:02 +0800)
committerqydysky <32743305+qydysky@users.noreply.github.com>
Sat, 11 Feb 2023 14:02:57 +0000 (22:02 +0800)
Reply/F.go

index 242805ed3187631bf338d30231d36245c9402246..397aea01239d6c536fe533a3af9ba032cc035ef9 100644 (file)
@@ -1148,7 +1148,7 @@ func init() {
 
                                var filePaths []paf
                                for i, n := 0, len(list); i < n; i++ {
-                                       if list[i].IsDir() {
+                                       if list[i].IsDir() && len(list[i].Name()) > 20 {
                                                filePaths = append(filePaths, paf{list[i].Name()[20:], list[i].Name()[:19], list[i].Name()})
                                        }
                                }