mirror of
https://github.com/astaxie/beego.git
synced 2025-07-10 04:50:18 +00:00
fix #248
This commit is contained in:
@ -116,6 +116,15 @@ func (fp *FileProvider) SessionRead(sid string) (SessionStore, error) {
|
||||
return ss, nil
|
||||
}
|
||||
|
||||
func (fp *FileProvider) SessionExist(sid string) bool {
|
||||
_, err := os.Stat(path.Join(fp.savePath, string(sid[0]), string(sid[1]), sid))
|
||||
if err == nil {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func (fp *FileProvider) SessionDestroy(sid string) error {
|
||||
os.Remove(path.Join(fp.savePath))
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user