-
Notifications
You must be signed in to change notification settings - Fork 248
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
Content of added_paths, modified_paths seems unintuitive? #27
Comments
Hi Cobi, You right it should work as you thought, the behavior you report is definitely not the good one. @Maher4Ever do you have an insight about that one? |
|
Yeah please, it would be helpful! |
Alrighty, here's the example code in a repo with instructions for reproducing the issue, including a shell script for modifying the files in sequence. Furthermore, I can reproduce it in multiple versions of ruby—see the bottom of the example code repo's README for specifics. |
Awesome, thanks! |
Ok, I got the same output now. @Maher4Ever same for you? |
First of all, let me thank you for this great bug report and for making that issue-repo. It is ideal :).
On mac on the other hand, I got the same output you reported in that repo. I'll investigate more. |
Odd! No worries—let me know if you want me to test out anything on my end :) |
Same output for me, thanks @cobychapple for the awesome issue report! |
Could you guys confirm if the fix works? I tested it on all supported systems and it did work. |
Works like a charm for me. 👍 |
Confirmed as working at this end too. Thanks for the fix! Does this warrant bumping the version number and updating what's available on rubygems.org so that others receive this fix too without specifying the GitHub repo? |
Yeah, +1 for a little release! |
Great, then listen 0.4.2 will be released at the end of the day :) |
Listen v0.4.2 is ✨ released ✨ |
👍! |
Excellent—thanks all! |
Given the following script:
and trivial example files
file1.txt
,file2.rb
, andfile3.py
under asource
directory, I run the script:And then edit
file1.txt
and see:And then edit
file2.rb
and see:And then edit
file3.py
and see:I would have thought those three operations would simply cause the output to be:
I can understand why the first modification might trigger all files in the listened-to directory to be "added" (though the files existed before the script was run, so they weren't really added), but for the second two actions I can't understand why the previously modified file is the first path returned in the array, followed by the file whose change really triggered the event.
Is this how it's supposed to function? If so, it seems like it might be a little unintuitive.
I'm on OSX 10.7.3, with Ruby 1.9.3p0 (2011-10-30 revision 33570).
The text was updated successfully, but these errors were encountered: