1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-19 09:20:40 +00:00

Merge pull request from kristen1980/patch-2

Allow absolute path for filesystem cache
This commit is contained in:
astaxie
2014-12-18 21:24:17 +08:00

2
cache/file.go vendored

@ -92,8 +92,6 @@ func (fc *FileCache) StartAndGC(config string) error {
// Init will make new dir for file cache if not exist. // Init will make new dir for file cache if not exist.
func (fc *FileCache) Init() { func (fc *FileCache) Init() {
app := filepath.Dir(os.Args[0])
fc.CachePath = filepath.Join(app, fc.CachePath)
if ok, _ := exists(fc.CachePath); !ok { // todo : error handle if ok, _ := exists(fc.CachePath); !ok { // todo : error handle
_ = os.MkdirAll(fc.CachePath, os.ModePerm) // todo : error handle _ = os.MkdirAll(fc.CachePath, os.ModePerm) // todo : error handle
} }