Code review and fixes.
This commit is contained in:
1 parent
f2a35a9305
commit
60f7f7a2e9
12 files changed
+185
-34
No files matched your search
@@ -38,7 +38,7 @@ func validateWinePrograms(programs []string) error {
|
||||
return fmt.Errorf("Wine program \"%s\" is a path. Type only the executable name, such as Game.exe, or delete the entry.", name)
|
||||
case len(name) > 255:
|
||||
return fmt.Errorf("Wine program \"%s\" is too long. Executable names may be at most 255 characters; fix or delete the entry.", name)
|
||||
case strings.TrimSpace(name) != name || strings.ContainsAny(name, "\x00\r\n"):
|
||||
case !config.ValidWineProgramName(name):
|
||||
return fmt.Errorf("Wine program \"%s\" is not a valid executable name. Remove the surrounding spaces or control characters, or delete the entry.", name)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user