Revert "mount: remove mount directory from generating cache directory id"

This reverts commit 109dc7fdf6.
This commit is contained in:
chrislu 2022-10-14 22:24:14 -07:00
parent 2f72103c83
commit 5c2eb602c9

View file

@ -190,7 +190,7 @@ func (wfs *WFS) getCurrentFiler() pb.ServerAddress {
} }
func (option *Option) setupUniqueCacheDirectory() { func (option *Option) setupUniqueCacheDirectory() {
cacheUniqueId := util.Md5String([]byte(string(option.FilerAddresses[0]) + option.FilerMountRootPath + util.Version()))[0:8] cacheUniqueId := util.Md5String([]byte(option.MountDirectory + string(option.FilerAddresses[0]) + option.FilerMountRootPath + util.Version()))[0:8]
option.uniqueCacheDir = path.Join(option.CacheDir, cacheUniqueId) option.uniqueCacheDir = path.Join(option.CacheDir, cacheUniqueId)
option.uniqueCacheTempPageDir = filepath.Join(option.uniqueCacheDir, "swap") option.uniqueCacheTempPageDir = filepath.Join(option.uniqueCacheDir, "swap")
os.MkdirAll(option.uniqueCacheTempPageDir, os.FileMode(0777)&^option.Umask) os.MkdirAll(option.uniqueCacheTempPageDir, os.FileMode(0777)&^option.Umask)