remove unused code
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
|||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -58,8 +57,7 @@ type Option struct {
|
|||||||
Cipher bool // whether encrypt data on volume server
|
Cipher bool // whether encrypt data on volume server
|
||||||
UidGidMapper *meta_cache.UidGidMapper
|
UidGidMapper *meta_cache.UidGidMapper
|
||||||
|
|
||||||
uniqueCacheDir string
|
uniqueCacheDir string
|
||||||
uniqueCacheTempPageDir string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ = fs.FS(&WFS{})
|
var _ = fs.FS(&WFS{})
|
||||||
@@ -303,13 +301,8 @@ func (wfs *WFS) getCurrentFiler() pb.ServerAddress {
|
|||||||
func (option *Option) setupUniqueCacheDirectory() {
|
func (option *Option) setupUniqueCacheDirectory() {
|
||||||
cacheUniqueId := util.Md5String([]byte(option.MountDirectory + 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, "sw")
|
|
||||||
os.MkdirAll(option.uniqueCacheTempPageDir, os.FileMode(0777)&^option.Umask)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (option *Option) getTempFilePageDir() string {
|
|
||||||
return option.uniqueCacheTempPageDir
|
|
||||||
}
|
|
||||||
func (option *Option) getUniqueCacheDir() string {
|
func (option *Option) getUniqueCacheDir() string {
|
||||||
return option.uniqueCacheDir
|
return option.uniqueCacheDir
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import (
|
|||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fs"
|
"github.com/hanwen/go-fuse/v2/fs"
|
||||||
@@ -50,8 +49,7 @@ type Option struct {
|
|||||||
Cipher bool // whether encrypt data on volume server
|
Cipher bool // whether encrypt data on volume server
|
||||||
UidGidMapper *meta_cache.UidGidMapper
|
UidGidMapper *meta_cache.UidGidMapper
|
||||||
|
|
||||||
uniqueCacheDir string
|
uniqueCacheDir string
|
||||||
uniqueCacheTempPageDir string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type WFS struct {
|
type WFS struct {
|
||||||
@@ -177,13 +175,8 @@ func (wfs *WFS) getCurrentFiler() pb.ServerAddress {
|
|||||||
func (option *Option) setupUniqueCacheDirectory() {
|
func (option *Option) setupUniqueCacheDirectory() {
|
||||||
cacheUniqueId := util.Md5String([]byte(option.MountDirectory + 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, "sw")
|
|
||||||
os.MkdirAll(option.uniqueCacheTempPageDir, os.FileMode(0777)&^option.Umask)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (option *Option) getTempFilePageDir() string {
|
|
||||||
return option.uniqueCacheTempPageDir
|
|
||||||
}
|
|
||||||
func (option *Option) getUniqueCacheDir() string {
|
func (option *Option) getUniqueCacheDir() string {
|
||||||
return option.uniqueCacheDir
|
return option.uniqueCacheDir
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user