-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Case sensitivity issue #96
Comments
which operating system and file system is this issue for? |
@nathany Oh sorry, we were discussing it over e-mail - it's for |
Yes was in macos. I'll see if it repro on Windows. Sent from Outlook Mobilehttps://aka.ms/qtex0l On Tue, Mar 15, 2016 at 9:33 AM -0700, "Rafal Jeczalik" <[email protected]mailto:[email protected]> wrote: @nathanyhttps://github.com/nathany Oh sorry, we were discussing it over e-mail - it's for fsevents. You are receiving this because you authored the thread. |
Using Case Sensitive HFS+? |
No. Sent from Outlook Mobilehttps://aka.ms/qtex0l From: Nathan Youngman <[email protected]mailto:[email protected]> Using Case Sensitive HFS+? You are receiving this because you authored the thread. |
Oh. That is odd. Here is a similar issue in nodejs: paulmillr/chokidar#418 It sounds like it's something FSEvents itself does. |
@nathany The problem is if you set a watch on Example: package main
import (
"log"
"github.com/rjeczalik/notify"
)
func main() {
c := make(chan notify.EventInfo, 1)
if err := notify.Watch("/users/rjeczalik/test/", c, notify.All); err != nil {
log.Fatal(err)
}
defer notify.Stop(c)
ei := <-c
log.Println("event", ei)
} $ go run -tags debug notify.go # run it with debug on $ touch ~/test/test # create a file The program will output:
The solution would be to call or replace |
I'm not seeing the issue on Windows. |
Would it be possible to just fix |
Yup, that's the plan, we'll need |
Glad you guys know the issue. I tried to find a workaround where I read DIR names from the file system to see if I get back the correct case and then reconstruct the path that i passed to Watch but the Stat API still returns the Users directory with a lower case u (users). So no way for me to get correct case or real path from Go. On Mar 15, 2016, at 3:08 PM, Rafal Jeczalik <[email protected]mailto:[email protected]> wrote: Would it be possible to just fix /users/rjeczalik/test to the actual path at the beginning of Watch? Yup, that's the plan, we'll need realpath syscall for that. You are receiving this because you authored the thread. |
I figured out a work around where I can use ReadDirNames and get the case corrected path to pass into Watch. but, a fix would still be appreciated. /* ---------------------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------------------*/ |
Like @dahovey I sure spent a lot of time trying to understand why a project dependent upon this package did not work at all. #96 (comment) I filed an issue to help users there if they have the same issue: cortesi/modd#102 That said, I really appreciate this exists, and thank you for the fantastic contribution to the eco-system! ❤️ |
If I start a watch with a path that doesn't match the case sensitivity of whats in the file system, events get filtered out and not sent. I had an email exchange with you about this.
doesn't work
err := notify.Watch("/users/sbailey/...", c, notify.All)
works
The text was updated successfully, but these errors were encountered: