mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-07 18:50:27 +08:00
缓存路径为/时,不再提示错误
This commit is contained in:
@@ -54,7 +54,12 @@ func (this *FileList) Init() error {
|
|||||||
|
|
||||||
this.itemsTableName = "cacheItems_v2"
|
this.itemsTableName = "cacheItems_v2"
|
||||||
|
|
||||||
db, err := sql.Open("sqlite3", "file:"+this.dir+"/index.db?cache=shared&mode=rwc&_journal_mode=WAL")
|
var dir = this.dir
|
||||||
|
if dir == "/" {
|
||||||
|
// 防止sqlite提示authority错误
|
||||||
|
dir = ""
|
||||||
|
}
|
||||||
|
db, err := sql.Open("sqlite3", "file:"+dir+"/index.db?cache=shared&mode=rwc&_journal_mode=WAL")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user