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

lib/fs: Use io/fs errors as recommended in std lib #8726

Merged
merged 2 commits into from Dec 21, 2022

Conversation

imsodin
Copy link
Member

@imsodin imsodin commented Dec 21, 2022

Stumbled over this randomly, small housekeeping: The os package tells one to use errors.Is with the errors in io/fs instead of these functions predating the newer style error handling.

calmh
calmh previously approved these changes Dec 21, 2022
@calmh
Copy link
Member

calmh commented Dec 21, 2022

Some test seems to require adjustment

@imsodin
Copy link
Member Author

imsodin commented Dec 21, 2022

That condition highlighted the change in behaviour: Previously the errors couldn't be wrapped, now it can. The condition in the test wanted to check that the error isn't that the .stignore itself doesn't exist (kinda weird it even checks that 🤷 ) , but that the included file doesn't - which is a ParseError wrapping an ErrNotExist.

@calmh calmh merged commit 634a3d0 into syncthing:main Dec 21, 2022
@imsodin imsodin deleted the fs/modern-errors branch December 21, 2022 23:06
@calmh calmh added this to the v1.22.3 milestone Dec 27, 2022
calmh added a commit to calmh/syncthing that referenced this pull request Jan 23, 2023
* main: (69 commits)
  Handle relay connect timeout (fixes syncthing#8749) (syncthing#8755)
  gui, man, authors: Update docs, translations, and contributors
  build: Go 1.19.5
  gui, man, authors: Update docs, translations, and contributors
  script: Add weblatedl.go for downloading updated translations (syncthing#8723)
  gui: Allow to translate action and type in Recent Changes modal (syncthing#8548)
  gui, man, authors: Update docs, translations, and contributors
  gui: Fix undefined lastSeenDays error in disconnected-inactive status check (ref syncthing#8530) (syncthing#8730)
  gui, man, authors: Update docs, translations, and contributors
  gui, api: Indicate running under container (syncthing#8728)
  lib/fs: Use io/fs errors as recommended in std lib (syncthing#8726)
  build: Handle co-authors (ref syncthing#3744) (syncthing#8708)
  lib/fs: Watching is unsupported on android/amd64 (fixes syncthing#8709) (syncthing#8710)
  lib/model: Only log at info level if setting change time fails (syncthing#8725)
  lib/model: Don't lower rescan interval from default on auto accepted enc folder (fixes syncthing#8572) (syncthing#8573)
  gui, man, authors: Update docs, translations, and contributors
  gui: Remove unmaintained language variant nl-BE (syncthing#8722)
  gui, script: Fix indentation in lang-en.json to match others (syncthing#8721)
  docker: Ensure entrypoint is executable (syncthing#8719)
  Go 1.19.4
  ...
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Dec 22, 2023
@syncthing syncthing locked and limited conversation to collaborators Dec 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants