mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-06-28 21:31:56 +02:00
avoid unnecessary user home checking
This commit is contained in:
parent
2270737344
commit
72b0d9d8c4
|
@ -69,6 +69,10 @@ func CheckFile(filename string) (exists, canRead, canWrite bool, modTime time.Ti
|
||||||
|
|
||||||
func ResolvePath(path string) string {
|
func ResolvePath(path string) string {
|
||||||
|
|
||||||
|
if !strings.Contains(path, "~") {
|
||||||
|
return path
|
||||||
|
}
|
||||||
|
|
||||||
usr, _ := user.Current()
|
usr, _ := user.Current()
|
||||||
dir := usr.HomeDir
|
dir := usr.HomeDir
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue