Merge pull request #953 from kristen1980/patch-2
Allow absolute path for filesystem cache
Showing
1 changed file
with
0 additions
and
2 deletions
| ... | @@ -92,8 +92,6 @@ func (fc *FileCache) StartAndGC(config string) error { | ... | @@ -92,8 +92,6 @@ func (fc *FileCache) StartAndGC(config string) error { |
| 92 | 92 | ||
| 93 | // Init will make new dir for file cache if not exist. | 93 | // Init will make new dir for file cache if not exist. |
| 94 | func (fc *FileCache) Init() { | 94 | func (fc *FileCache) Init() { |
| 95 | app := filepath.Dir(os.Args[0]) | ||
| 96 | fc.CachePath = filepath.Join(app, fc.CachePath) | ||
| 97 | if ok, _ := exists(fc.CachePath); !ok { // todo : error handle | 95 | if ok, _ := exists(fc.CachePath); !ok { // todo : error handle |
| 98 | _ = os.MkdirAll(fc.CachePath, os.ModePerm) // todo : error handle | 96 | _ = os.MkdirAll(fc.CachePath, os.ModePerm) // todo : error handle |
| 99 | } | 97 | } | ... | ... |
-
Please register or sign in to post a comment