Add contained home file endpoint
This commit is contained in:
@@ -442,7 +442,7 @@ func resolveChatDirectory(directory string) (string, error) {
|
||||
// location. It is resolved through the standard library so it never falls back
|
||||
// to the process working directory.
|
||||
func OperatorHomeDirectory() (string, error) {
|
||||
home, err := os.UserHomeDir()
|
||||
home, err := operatorHomeDirectory()
|
||||
if err != nil {
|
||||
return "", errors.New("resolve operator home directory: " + err.Error())
|
||||
}
|
||||
@@ -451,3 +451,7 @@ func OperatorHomeDirectory() (string, error) {
|
||||
}
|
||||
return home, nil
|
||||
}
|
||||
|
||||
// operatorHomeDirectory is a seam for tests of filesystem endpoints that are
|
||||
// rooted at the operator's home directory.
|
||||
var operatorHomeDirectory = os.UserHomeDir
|
||||
|
||||
Reference in New Issue
Block a user