diff --git a/service/pkg/util/gopeed/down.go b/service/pkg/util/gopeed/down.go index 90eac149..69f5bb9b 100644 --- a/service/pkg/util/gopeed/down.go +++ b/service/pkg/util/gopeed/down.go @@ -96,7 +96,7 @@ func Down(request *Request, to string) error { // allocate file nanoid, _ := gonanoid.Nanoid() filename := response.Name + "." + nanoid - tmpPath := path.Join("/tmp", filename) + tmpPath := path.Join(os.TempDir(), filename) file, err := os.Create(tmpPath) if err != nil { return err diff --git a/service/pre.go b/service/pre.go index 55a1017e..bcf02c74 100644 --- a/service/pre.go +++ b/service/pre.go @@ -39,10 +39,10 @@ func checkEnvironment() { config := conf.GetEnvironmentConfig() if !config.PassCheckRoot || config.ResetPassword { if os.Getegid() != 0 { - log.Fatal("Please execute this program with sudo or as a root user for the best experience.\n"+ - "If you are sure you are root user, use the --passcheckroot parameter to skip the check.\n", - "If you don't want to run as root or you are a non-linux user, use --lite please.", - "For example:", + log.Fatal("Please execute this program with sudo or as a root user for the best experience.\n" + + "If you are sure you are root user, use the --passcheckroot parameter to skip the check.\n" + + "If you don't want to run as root or you are a non-linux user, use --lite please.\n" + + "For example:\n" + "$ v2raya --lite", ) }