Browse Source

Fix warnings

Volodymyr Tkach 2 years ago
parent
commit
ef7e282268
1 changed files with 2 additions and 2 deletions
  1. 2 2
      engine/utils/utils.go

+ 2 - 2
engine/utils/utils.go

@@ -549,11 +549,11 @@ func SMTPSend(host, port, user, pass, subject, msg string, receivers []string) e
 func SafeFilePath(path string) string {
 func SafeFilePath(path string) string {
 	result := path
 	result := path
 
 
-	if reg, err := regexp.Compile("([/]+\\.\\.)|(\\.\\.[/]+)"); err == nil {
+	if reg, err := regexp.Compile(`([/]+\.\.)|(\.\.[/]+)`); err == nil {
 		result = reg.ReplaceAllString(result, "/")
 		result = reg.ReplaceAllString(result, "/")
 	}
 	}
 
 
-	if reg, err := regexp.Compile("([/]+[\\.]+[/]+)"); err == nil {
+	if reg, err := regexp.Compile(`([/]+[\.]+[/]+)`); err == nil {
 		result = reg.ReplaceAllString(result, "/")
 		result = reg.ReplaceAllString(result, "/")
 	}
 	}