mirror of
https://github.com/consbio/mbtileserver.git
synced 2024-09-11 07:15:24 +03:00
Fix crash caused by corrupted mbtiles file (#55)
This commit is contained in:
parent
ab619df2e3
commit
54f689c6a3
@ -13,6 +13,7 @@ import (
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -200,7 +201,7 @@ func NewFromBaseDir(baseDir string, secretKey string) (*ServiceSet, error) {
|
||||
id := p[:len(p)-len(e)]
|
||||
err = s.AddDBOnPath(filename, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
log.Warnf("Skipping corrupt mbtiles '%s': %s", filename, err.Error())
|
||||
}
|
||||
}
|
||||
return s, nil
|
||||
|
Loading…
Reference in New Issue
Block a user