summaryrefslogtreecommitdiff
path: root/src/reader.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-02-25 10:12:19 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-02-25 10:12:19 +0900
commitc1accc2e5bd03c5c1516d99058e3e75241ae7f76 (patch)
treea185d198e8d92660437537272fb108cf95f5235e /src/reader.go
parente4489dcbc1e544ea15a9c89028ed29602ef7e941 (diff)
downloadfzf-c1accc2e5bd03c5c1516d99058e3e75241ae7f76.tar.gz
Use '/' as path separator on MSYS2
Fix #4281
Diffstat (limited to 'src/reader.go')
-rw-r--r--src/reader.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/reader.go b/src/reader.go
index 679cb636..a71f9697 100644
--- a/src/reader.go
+++ b/src/reader.go
@@ -277,6 +277,9 @@ func (r *Reader) readFiles(roots []string, opts walkerOpts, ignores []string) bo
ignoresFull := []string{}
ignoresSuffix := []string{}
sep := string(os.PathSeparator)
+ if _, ok := os.LookupEnv("MSYSTEM"); ok {
+ sep = "/"
+ }
for _, ignore := range ignores {
if strings.ContainsRune(ignore, os.PathSeparator) {
if strings.HasPrefix(ignore, sep) {