Skip to content
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

Add AddRaw method which does not follow symlinks #289

Merged
merged 3 commits into from Aug 18, 2021

Conversation

Code0x58
Copy link
Contributor

@Code0x58 Code0x58 commented Apr 6, 2019

This is a minor† change for #199 which on the surface adds a AddRaw method to the public interface which does not resolve symlinks before starting a watch.

  • rewrite existing Add methods to be called AddRaw and not follow symlinks
  • reimplement a generic Add method which uses filepath.EvalSymlinks(name) before calling AddRaw
  • consider adding atomic symlink update method (separate issue)
  • document

A follow on from this would be to offer a high level interface as mentioned on my initial comment for the issue - this can be tracked in a separate issue+PR.

† this does change the behaviour of Add on windows as it didn't follow symlinks (which do exist) before, but now it does

@Code0x58 Code0x58 force-pushed the 199-fix branch 10 times, most recently from a74321f to 3891ea9 Compare April 11, 2019 22:58
@Code0x58 Code0x58 changed the title WIP: Do not follow symlinks by default Do not follow symlinks by default Apr 11, 2019
@Code0x58 Code0x58 changed the title Do not follow symlinks by default 199 - Do not follow symlinks by default Apr 11, 2019
@Code0x58 Code0x58 changed the title 199 - Do not follow symlinks by default #199 Do not follow symlinks by default Apr 11, 2019
Copy link
Contributor

@nathany nathany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good idea. Thanks.

README.md Outdated Show resolved Hide resolved
integration_test.go Outdated Show resolved Hide resolved
integration_test.go Outdated Show resolved Hide resolved
integration_test.go Outdated Show resolved Hide resolved
@nathany
Copy link
Contributor

nathany commented Oct 5, 2019

This would also fix #227.

@nathany nathany changed the title #199 Do not follow symlinks by default Do not follow symlinks by default Oct 5, 2019
@nathany nathany changed the title Do not follow symlinks by default Do not follow symlinks Oct 5, 2019
@nathany nathany added the API label Oct 5, 2019
@Code0x58 Code0x58 force-pushed the 199-fix branch 2 times, most recently from 12ace1d to 8b18300 Compare October 6, 2019 20:50
@Code0x58 Code0x58 requested a review from nathany October 6, 2019 20:52
@Code0x58 Code0x58 mentioned this pull request Oct 6, 2019
fen.go Outdated Show resolved Hide resolved
inotify.go Outdated Show resolved Hide resolved
fsnotify.go Outdated Show resolved Hide resolved
fen.go Outdated Show resolved Hide resolved
windows.go Outdated Show resolved Hide resolved
kqueue.go Outdated Show resolved Hide resolved
inotify.go Outdated Show resolved Hide resolved
fsnotify.go Outdated Show resolved Hide resolved
fsnotify.go Outdated Show resolved Hide resolved
fsnotify.go Outdated Show resolved Hide resolved
Copy link

@niejian niejian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

niejian
niejian previously approved these changes May 20, 2021
Copy link

@niejian niejian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nathany
Copy link
Contributor

nathany commented Jul 31, 2021

Thanks. And apologies for the delay.

We need to sort out that CI issue #373.

@Code0x58
Copy link
Contributor Author

Code0x58 commented Aug 1, 2021

Here's a PR for migrating away from Travis CI which shows green for master with go 1.11+ #378. I rebased a copy of this branch onto that and the build is green too [test results]

nathany
nathany previously approved these changes Aug 2, 2021
README.md Outdated Show resolved Hide resolved
@nathany
Copy link
Contributor

nathany commented Aug 2, 2021

@Code0x58 I sent you a GitHub invite. Feel free to merge this.

Would you be willing to also update the CHANGELOG, AUTHORS, and tag a new release?

@Code0x58
Copy link
Contributor Author

Code0x58 commented Aug 2, 2021

Thanks @nathany, I squashed the PR to avoid adding 2 other author emails for myself. It seems I can't push to master so will need an additional approval following the rebase, and might not be able to tag (not sure). Here's another PR to update the CHANGELOG and AUTHORS #380

@Code0x58 Code0x58 merged commit e2e9517 into fsnotify:master Aug 18, 2021
@Code0x58 Code0x58 deleted the 199-fix branch August 18, 2021 21:08
nathany added a commit that referenced this pull request Aug 24, 2021
nathany added a commit that referenced this pull request Aug 24, 2021
ianyh pushed a commit to PreVeil/fsnotify that referenced this pull request Jan 19, 2022
* introduce GitHub Actions

* Add lint+vet+old versions to GitHub Action

* Remove Travis CI and references

* Drop support/testing for Go 1.11 and earlier (fsnotify#381)

* Update x/sys to latest (fsnotify#379)

* add //go:build lines + add 1.17.0-rc2 to test matrix (fsnotify#377)

* Update test matrix for go 1.17 stable release (fsnotify#385)

* Add AddRaw to not follow symlinks + Fix link folloing on Windows (fsnotify#289)

* v1.5.0 preparation (fsnotify#380)

* revise pull request template

* Revert "Add AddRaw to not follow symlinks + Fix link folloing on Windows (fsnotify#289)"

This reverts commit e2e9517.

* prepare 1.5.1, retract 1.5.0

* Removed dead link

* Update issue templates (fsnotify#410)

* Update issue templates

* remove old issue template

* Test on Go 1.18 and two most recent versions (fsnotify#411)

* Test on Go 1.18 and two most recent versions

* on push

* ci

* update readme

* revise contributing

* maintainers wanted

* Final Notice: Maintainers Wanted

* fix go vet warnings: call to (*T).Fatalf from a non-test goroutine (fsnotify#416)

* made the changes related to recursive directory check

* made changes in window.go for buffer size

* DA-992: Pair windows' delete + create event to generate a rename event (#1)

* made the changes related to recursive directory check

* made changes in window.go for buffer size

* added the oldname attribute

* old name added to rename event, one event is generated for rename

* added oldname in printing rename events

* tests for checking  the oldName attr for rename added

* create fsnotify event added

* input to create event changed

* create fsnotify event function modified

* ID added

* logs added

* added create fsnotify event in inotify

* logs added

* prints added

* reviews

* reviews addressed

* Hangkun/da 992/window rename event (#2)

* Let's begin

* Add getpath

* Init test workflow

* 1.40.0 exits?

* Linter fix

* asdf

* 100

Co-authored-by: hu13 <hangkun@preveil.com>

* Clean up unused

* Badge

Co-authored-by: Hangkun Ung <hangkun.ung@gmail.com>
Co-authored-by: hu13 <hangkun@preveil.com>

* Rebase upstream fixes

* Rename bundle only works on windows

* Update CI golang

Co-authored-by: Ichinose Shogo <shogo82148@gmail.com>
Co-authored-by: Oliver Bristow <evilumbrella+github@gmail.com>
Co-authored-by: Nahum Shalman <nahamu@gmail.com>
Co-authored-by: Nathan Youngman <4566+nathany@users.noreply.github.com>
Co-authored-by: Loïc Vernet <vernet.loic@gmail.com>
Co-authored-by: Nathan Youngman <git@nathany.com>
Co-authored-by: paris <pariya.b@gmail.com>
Co-authored-by: hu13 <hangkun@preveil.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants