mirror of
https://github.com/openharmony/third_party_rust_which-rs.git
synced 2026-07-01 21:14:07 -04:00
fix #47 Pathext parsing error
This commit is contained in:
+1
-1
@@ -155,7 +155,7 @@ impl Finder {
|
||||
.map(|pathext| {
|
||||
pathext.split(';')
|
||||
.filter_map(|s| {
|
||||
if s.as_bytes()[0] == b'.' {
|
||||
if s.as_bytes().first() == Some(b'.') {
|
||||
Some(s.to_owned())
|
||||
} else {
|
||||
// Invalid segment; just ignore it.
|
||||
|
||||
Reference in New Issue
Block a user