mirror of
https://github.com/v2rayA/v2rayA.git
synced 2026-11-20 23:02:25 +03:00
fix: use os.Tempdir instead of /tmp
This commit is contained in:
1 parent
6f0f2a11cf
commit
e9feddd483
2 files changed
+5
-5
No files matched your search
@@ -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
|
||||
|
||||
+4
-4
@@ -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",
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user