basicfs_watch_errors_linux.go 441 B

123456789101112131415161718
  1. // Copyright (C) 2016 The Syncthing Authors.
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5. // You can obtain one at http://mozilla.org/MPL/2.0/.
  6. // +build linux
  7. package fs
  8. import "syscall"
  9. func reachedMaxUserWatches(err error) bool {
  10. if errno, ok := err.(syscall.Errno); ok {
  11. return errno == 24 || errno == 28
  12. }
  13. return false
  14. }