未验证 提交 bfcd6be7 编写于 作者: D Davies Liu 提交者: GitHub

use absolute path for SQLite (#393)

上级 b8d2f264
......@@ -176,6 +176,18 @@ func mount(c *cli.Context) error {
}
}
}
sqliteScheme := "sqlite3://"
if strings.HasPrefix(addr, sqliteScheme) {
path := addr[len(sqliteScheme):]
path2, err := filepath.Abs(path)
if err == nil && path2 != path {
for i, a := range os.Args {
if a == addr {
os.Args[i] = sqliteScheme + path2
}
}
}
}
// The default log to syslog is only in daemon mode.
utils.InitLoggers(!c.Bool("no-syslog"))
err := makeDaemon(conf.Format.Name, conf.Mountpoint)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册