remove unneeded check on length

This commit is contained in:
koranza 2018-05-19 14:48:19 -05:00 • committed by GitHub
commit f9358e85ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,7 +152,7 @@ proc findExe*(exe: string, followSymlinks: bool = true;
for candidate in split(path, PathSep):
if candidate.len == 0: continue
when defined(windows):
var x = (if candidate.len > 2 and candidate[0] == '"' and candidate[^1] == '"':
var x = (if candidate[0] == '"' and candidate[^1] == '"':
substr(candidate, 1, candidate.len-2) else: candidate) /
exe
else: