From fbc868522d4b6bbf915602daa7083904ebdd748b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Thu, 21 May 2026 15:38:00 +0200 Subject: [PATCH 1/2] Verify parent ids during the consistency check Fixes #2372 --- opencloud/pkg/command/posixfs.go | 89 +++++++++++++++++++++++++++----- 1 file changed, 77 insertions(+), 12 deletions(-) diff --git a/opencloud/pkg/command/posixfs.go b/opencloud/pkg/command/posixfs.go index d25df3052f..d0218ecf75 100644 --- a/opencloud/pkg/command/posixfs.go +++ b/opencloud/pkg/command/posixfs.go @@ -16,9 +16,12 @@ import ( "github.com/opencloud-eu/opencloud/services/storage-users/pkg/event" "github.com/opencloud-eu/opencloud/services/storage-users/pkg/revaconfig" "github.com/opencloud-eu/reva/v2/pkg/events" + "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/ignore" + "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/options" "github.com/opencloud-eu/reva/v2/pkg/storage/fs/registry" "github.com/pkg/xattr" + "github.com/rs/zerolog" "github.com/spf13/cobra" "github.com/theckman/yacspin" "github.com/vmihailenco/msgpack/v5" @@ -35,6 +38,7 @@ const ( var ( spinner *yacspin.Spinner restartRequired = false + ignorer *ignore.Ignorer ) type IDCacher interface { @@ -153,6 +157,12 @@ func checkPosixfsConsistency(cmd *cobra.Command, cfg *config.Config) error { rootPath, _ := cmd.Flags().GetString("root") indexesPath := filepath.Join(rootPath, "indexes") + opt, _ := options.New(map[string]interface{}{ + "root": rootPath, + }) + log := zerolog.Nop() + ignorer = ignore.NewIgnorer(opt, &log) + _, err := os.Stat(indexesPath) if err != nil { if os.IsNotExist(err) { @@ -209,6 +219,7 @@ func checkSpaces(basePath string) { } func checkSpace(spacePath string) { + spinner.Message("") spinner.Suffix(fmt.Sprintf(" Checking space '%s'", spacePath)) info, err := os.Stat(spacePath) @@ -228,10 +239,11 @@ func checkSpace(spacePath string) { } checkSpaceID(spacePath) + checkNodeIDs(spacePath) } func checkSpaceID(spacePath string) { - spinner.Message("checking space ID uniqueness") + spinner.Message(" - checking space ID uniqueness") entries, uniqueIDs, oldestEntry, err := gatherAttributes(spacePath) if err != nil { @@ -240,7 +252,6 @@ func checkSpaceID(spacePath string) { } if len(entries) == 0 { - logSuccess("(empty space)") return } @@ -278,8 +289,65 @@ func checkSpaceID(spacePath string) { } fixSpaceID(spacePath, obsoleteIDs, targetID, entries) spinner.Unpause() - } else { - logSuccess("") + } +} + +func walkParentIDs(dir string, parentID string) int { + fixes := 0 + entries, err := os.ReadDir(dir) + if err != nil { + logFailure("Error reading directory '%s': %v", dir, err) + return 0 + } + + for _, entry := range entries { + fullPath := filepath.Join(dir, entry.Name()) + + if ignorer.IsIgnored(fullPath) { + continue + } + + actualParentID, err := xattr.Get(fullPath, parentIDAttrName) + if err != nil || string(actualParentID) != parentID { + err = xattr.Set(fullPath, parentIDAttrName, []byte(parentID)) + if err != nil { + logFailure("Failed to fix parent ID for '%s': %v", fullPath, err) + } else { + spinner.Pause() + fmt.Printf("\n + Fixed parent ID for '%s'\n", fullPath) + spinner.Unpause() + fixes++ + restartRequired = true + } + } + + if entry.IsDir() { + nodeID, err := xattr.Get(fullPath, idAttrName) + if err != nil || len(nodeID) == 0 { + logFailure("Directory '%s' missing '%s', skipping its children", fullPath, idAttrName) + continue + } + walkParentIDs(fullPath, string(nodeID)) + } + } + return fixes +} + +func checkNodeIDs(spacePath string) { + spinner.Message(" - checking parent IDs") + + rootID, err := xattr.Get(spacePath, idAttrName) + if err != nil || len(rootID) == 0 { + logFailure("Space root '%s' missing '%s' attribute", spacePath, idAttrName) + return + } + + fixes := walkParentIDs(spacePath, string(rootID)) + + if fixes > 0 { + spinner.Pause() + fmt.Printf("\n ✓ Fixed %d incorrect parent IDs in %s\n", fixes, filepath.Base(spacePath)) + spinner.Unpause() } } @@ -324,6 +392,9 @@ func gatherAttributes(path string) ([]EntryInfo, map[string]struct{}, EntryInfo, for _, entry := range dirEntries { fullPath := filepath.Join(path, entry.Name()) + if ignorer.IsIgnored(fullPath) { + continue + } info, err := os.Stat(fullPath) if err != nil { fmt.Printf(" - Warning: could not stat %s: %v\n", entry.Name(), err) @@ -428,7 +499,7 @@ func updateOwnerIndexFile(basePath string, obsoleteIDs []string) error { return fmt.Errorf("failed to write updated index file: %w", err) } - logSuccess("Successfully removed %d item(s) and saved index file.\n", itemsRemoved) + fmt.Printf(" ✓ Successfully removed %d item(s) and saved index file.\n", itemsRemoved) return nil } @@ -447,13 +518,7 @@ func removeAttributes(path string) error { } func logFailure(message string, args ...any) { - spinner.StopFailMessage(fmt.Sprintf(message, args...)) + spinner.StopFailMessage(fmt.Sprintf("\n"+message, args...)) spinner.StopFail() spinner.Start() } - -func logSuccess(message string, args ...any) { - spinner.StopMessage(fmt.Sprintf(message, args...)) - spinner.Stop() - spinner.Start() -} From c336e4ae34a5e2cf21b0ba070f77b2ef4a0b1ec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Fri, 22 May 2026 10:37:47 +0200 Subject: [PATCH 2/2] Bump reva --- go.mod | 2 +- go.sum | 4 +- .../v2/pkg/storage/fs/posix/ignore/ignore.go | 84 +++++++++++++++++++ .../pkg/storage/fs/posix/tree/assimilation.go | 19 +++-- .../storage/fs/posix/tree/cephfswatcher.go | 2 +- .../posix/tree/gpfsfilauditloggingwatcher.go | 2 +- .../fs/posix/tree/gpfswatchfolderwatcher.go | 2 +- .../reva/v2/pkg/storage/fs/posix/tree/tree.go | 70 ++-------------- .../storage/fs/posix/tree/watcher_darwin.go | 5 +- .../storage/fs/posix/tree/watcher_linux.go | 2 +- vendor/modules.txt | 3 +- 11 files changed, 113 insertions(+), 82 deletions(-) create mode 100644 vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/ignore/ignore.go diff --git a/go.mod b/go.mod index 47ff25f542..85477ddedc 100644 --- a/go.mod +++ b/go.mod @@ -64,7 +64,7 @@ require ( github.com/open-policy-agent/opa v1.15.2 github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89 github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d - github.com/opencloud-eu/reva/v2 v2.46.0 + github.com/opencloud-eu/reva/v2 v2.46.1-0.20260522083006-063ee129f21e github.com/opensearch-project/opensearch-go/v4 v4.6.0 github.com/orcaman/concurrent-map v1.0.0 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 337f189dc0..4d94febb7e 100644 --- a/go.sum +++ b/go.sum @@ -952,8 +952,8 @@ github.com/opencloud-eu/inotifywaitgo v0.0.0-20251111171128-a390bae3c5e9 h1:dIft github.com/opencloud-eu/inotifywaitgo v0.0.0-20251111171128-a390bae3c5e9/go.mod h1:JWyDC6H+5oZRdUJUgKuaye+8Ph5hEs6HVzVoPKzWSGI= github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d h1:JcqGDiyrcaQwVyV861TUyQgO7uEmsjkhfm7aQd84dOw= github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q= -github.com/opencloud-eu/reva/v2 v2.46.0 h1:wYUHIHOsLP9vad/K19/52RRfoooeHUGY4BSeowNrbpY= -github.com/opencloud-eu/reva/v2 v2.46.0/go.mod h1:fWAzVpZlJQEY/qeIrd9d3U+LpqY9JGsjJ2dc0a1jCEs= +github.com/opencloud-eu/reva/v2 v2.46.1-0.20260522083006-063ee129f21e h1:T/UAzT0TMNm6C6TasumVGUUZzl6yWsa8SDALXgPLy7Q= +github.com/opencloud-eu/reva/v2 v2.46.1-0.20260522083006-063ee129f21e/go.mod h1:fWAzVpZlJQEY/qeIrd9d3U+LpqY9JGsjJ2dc0a1jCEs= github.com/opencloud-eu/secure v0.0.0-20260312082735-b6f5cb2244e4 h1:l2oB/RctH+t8r7QBj5p8thfEHCM/jF35aAY3WQ3hADI= github.com/opencloud-eu/secure v0.0.0-20260312082735-b6f5cb2244e4/go.mod h1:BmF5hyM6tXczk3MpQkFf1hpKSRqCyhqcbiQtiAF7+40= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= diff --git a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/ignore/ignore.go b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/ignore/ignore.go new file mode 100644 index 0000000000..35c5630810 --- /dev/null +++ b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/ignore/ignore.go @@ -0,0 +1,84 @@ +package ignore + +import ( + "path/filepath" + "strings" + + "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/blobstore" + "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/lookup" + "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/options" + "github.com/opencloud-eu/reva/v2/pkg/storage/utils/templates" + "github.com/rs/zerolog" +) + +// Ignorer handles checking if paths should be ignored in posix operations +type Ignorer struct { + options *options.Options + log *zerolog.Logger + personalSpacesRoot string + projectSpacesRoot string +} + +// NewIgnorer creates a new Ignorer given the posix options and logger +func NewIgnorer(options *options.Options, log *zerolog.Logger) *Ignorer { + return &Ignorer{ + options: options, + log: log, + personalSpacesRoot: filepath.Clean(filepath.Join(options.Root, templates.Base(options.PersonalSpacePathTemplate))), + projectSpacesRoot: filepath.Clean(filepath.Join(options.Root, templates.Base(options.GeneralSpacePathTemplate))), + } +} + +// IsIgnored checking if paths should be ignored in posix operations +func (i *Ignorer) IsIgnored(path string) bool { + return IsLockFile(path) || IsTrash(path) || i.IsUpload(path) || i.IsInternal(path) || i.IsRootPath(path) || i.IsSpaceRoot(path) +} + +func (i *Ignorer) IsUpload(path string) bool { + return strings.HasPrefix(path, i.options.UploadDirectory) +} + +func (i *Ignorer) IsIndex(path string) bool { + return strings.HasPrefix(path, filepath.Join(i.options.Root, "indexes")) +} + +func (i *Ignorer) IsTemporary(path string) bool { + if filepath.IsAbs(path) { + tmpDirPattern := filepath.Join(i.options.Root, "*", "*", blobstore.TMPDir) + isTempDir, err := filepath.Match(tmpDirPattern, path) + if err != nil { + i.log.Error().Err(err).Str("pattern", tmpDirPattern).Str("path", path).Msg("error matching temporary path") + return false + } + isTempParentDir, err := filepath.Match(tmpDirPattern, filepath.Dir(path)) + if err != nil { + i.log.Error().Err(err).Str("pattern", tmpDirPattern).Str("path", filepath.Dir(path)).Msg("error matching temporary path") + return false + } + return isTempDir || isTempParentDir + } + return path == blobstore.TMPDir || filepath.Dir(path) == blobstore.TMPDir +} + +func (i *Ignorer) IsRootPath(path string) bool { + return path == i.options.Root || + path == i.personalSpacesRoot || + path == i.projectSpacesRoot +} + +func (i *Ignorer) IsSpaceRoot(path string) bool { + parent := filepath.Dir(path) + return parent == i.personalSpacesRoot || parent == i.projectSpacesRoot +} + +func (i *Ignorer) IsInternal(path string) bool { + return i.IsIndex(path) || strings.Contains(path, lookup.MetadataDir) || i.IsTemporary(path) +} + +func IsLockFile(path string) bool { + return strings.HasSuffix(path, ".flock") || strings.HasSuffix(path, ".mlock") +} + +func IsTrash(path string) bool { + return strings.HasSuffix(path, ".trashinfo") || strings.HasSuffix(path, ".trashitem") || strings.Contains(path, ".Trash") +} diff --git a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/assimilation.go b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/assimilation.go index 484608b79d..9b15520da2 100644 --- a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/assimilation.go +++ b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/assimilation.go @@ -41,6 +41,7 @@ import ( "github.com/opencloud-eu/reva/v2/pkg/errtypes" "github.com/opencloud-eu/reva/v2/pkg/events" + "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/ignore" "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/watcher" "github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/metadata" "github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/metadata/prefixes" @@ -368,7 +369,7 @@ func (t *Tree) findSpaceId(path string) (string, error) { spaceCandidate := path for strings.HasPrefix(spaceCandidate, t.options.Root) { // jail at root - if t.isRootPath(spaceCandidate) { + if t.Ignorer.IsRootPath(spaceCandidate) { return "", ErrRootReached } @@ -709,7 +710,7 @@ assimilate: // The Space's name attribute might not match the directory name. Use the name as // it was set before. Also the space root doesn't have a 'type' attribute // currently so only set it for normal directories. - if t.isSpaceRoot(path) { + if t.Ignorer.IsSpaceRoot(path) { if previousAttribs != nil && previousAttribs[prefixes.NameAttr] != nil { attributes[prefixes.NameAttr] = previousAttribs[prefixes.NameAttr] } @@ -866,17 +867,17 @@ func (t *Tree) WarmupIDCache(root string, assimilate, onlyDirty bool) error { } // skip irrelevant files - if t.isInternal(path) || - isLockFile(path) || - isTrash(path) || - t.isUpload(path) || - t.isIndex(path) { + if t.Ignorer.IsInternal(path) || + ignore.IsLockFile(path) || + ignore.IsTrash(path) || + t.Ignorer.IsUpload(path) || + t.Ignorer.IsIndex(path) { if info.IsDir() { return filepath.SkipDir } return nil } - if t.isRootPath(path) { + if t.Ignorer.IsRootPath(path) { return nil // ignore the root paths } @@ -982,7 +983,7 @@ func (t *Tree) WarmupIDCache(root string, assimilate, onlyDirty bool) error { }) for dir, size := range sizes { - if t.isRootPath(dir) { + if t.Ignorer.IsRootPath(dir) { continue } spaceID, id, err := t.lookup.IDsForPath(context.Background(), dir) diff --git a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/cephfswatcher.go b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/cephfswatcher.go index 540907afda..ccd3e56f42 100644 --- a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/cephfswatcher.go +++ b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/cephfswatcher.go @@ -84,7 +84,7 @@ func (w *CephFSWatcher) Watch(topic string) { continue } - if w.tree.isIgnored(ev.Path) { + if w.tree.Ignorer.IsIgnored(ev.Path) { continue } diff --git a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/gpfsfilauditloggingwatcher.go b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/gpfsfilauditloggingwatcher.go index b43f23ea13..ee1934f9fc 100644 --- a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/gpfsfilauditloggingwatcher.go +++ b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/gpfsfilauditloggingwatcher.go @@ -83,7 +83,7 @@ start: w.log.Error().Err(err).Str("line", line).Msg("error unmarshalling line") continue } - if w.tree.isIgnored(ev.Path) { + if w.tree.Ignorer.IsIgnored(ev.Path) { continue } go func() { diff --git a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/gpfswatchfolderwatcher.go b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/gpfswatchfolderwatcher.go index 93d1b6218e..4382e4bff2 100644 --- a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/gpfswatchfolderwatcher.go +++ b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/gpfswatchfolderwatcher.go @@ -66,7 +66,7 @@ func (w *GpfsWatchFolderWatcher) Watch(topic string) { continue } - if w.tree.isIgnored(lwev.Path) { + if w.tree.Ignorer.IsIgnored(lwev.Path) { continue } diff --git a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/tree.go b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/tree.go index 045362b7b3..4a007f14d5 100644 --- a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/tree.go +++ b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/tree.go @@ -41,8 +41,8 @@ import ( "github.com/opencloud-eu/reva/v2/pkg/errtypes" "github.com/opencloud-eu/reva/v2/pkg/events" - "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/blobstore" "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/idcache" + "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/ignore" "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/lookup" "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/options" "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/trashbin" @@ -54,7 +54,6 @@ import ( "github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/permissions" "github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/tree/propagator" "github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/usermapper" - "github.com/opencloud-eu/reva/v2/pkg/storage/utils/templates" "github.com/opencloud-eu/reva/v2/pkg/utils" ) @@ -93,9 +92,8 @@ type Tree struct { idResolver IDResolver // points at the lookup but can be overridden for testing assimilateFunc func(item scanItem) error // function to call to assimilate a node, can be overridden for testing - options *options.Options - personalSpacesRoot string - projectSpacesRoot string + options *options.Options + Ignorer *ignore.Ignorer userMapper usermapper.Mapper idCache *idcache.IDCache @@ -128,10 +126,9 @@ func New(lu node.PathLookup, bs node.Blobstore, um usermapper.Mapper, trashbin * scanDebouncer: NewScanDebouncer(o.ScanDebounceDelay, func(item scanItem) { scanQueue <- item }), - es: es, - log: log, - personalSpacesRoot: filepath.Clean(filepath.Join(o.Root, templates.Base(o.PersonalSpacePathTemplate))), - projectSpacesRoot: filepath.Clean(filepath.Join(o.Root, templates.Base(o.GeneralSpacePathTemplate))), + es: es, + log: log, + Ignorer: ignore.NewIgnorer(o, log), } t.idResolver = t.lookup t.assimilateFunc = t.assimilate @@ -499,7 +496,7 @@ func (t *Tree) ListFolder(ctx context.Context, n *node.Node) ([]*node.Node, erro g.Go(func() error { defer close(work) for _, name := range names { - if t.isInternal(name) || isLockFile(name) || isTrash(name) { + if t.Ignorer.IsInternal(name) || ignore.IsLockFile(name) || ignore.IsTrash(name) { continue } @@ -776,56 +773,3 @@ func (t *Tree) createDirNode(ctx context.Context, n *node.Node) (err error) { } return n.SetXattrsWithContext(ctx, attributes, false) } - -func (t *Tree) isIgnored(path string) bool { - return isLockFile(path) || isTrash(path) || t.isUpload(path) || t.isInternal(path) || t.isRootPath(path) || t.isSpaceRoot(path) -} - -func (t *Tree) isUpload(path string) bool { - return strings.HasPrefix(path, t.options.UploadDirectory) -} - -func (t *Tree) isIndex(path string) bool { - return strings.HasPrefix(path, filepath.Join(t.options.Root, "indexes")) -} - -func (t *Tree) isTemporary(path string) bool { - if filepath.IsAbs(path) { - tmpDirPattern := filepath.Join(t.options.Root, "*", "*", blobstore.TMPDir) - isTempDir, err := filepath.Match(tmpDirPattern, path) - if err != nil { - t.log.Error().Err(err).Str("pattern", tmpDirPattern).Str("path", path).Msg("error matching temporary path") - return false - } - isTempParentDir, err := filepath.Match(tmpDirPattern, filepath.Dir(path)) - if err != nil { - t.log.Error().Err(err).Str("pattern", tmpDirPattern).Str("path", filepath.Dir(path)).Msg("error matching temporary path") - return false - } - return isTempDir || isTempParentDir - } - return path == blobstore.TMPDir || filepath.Dir(path) == blobstore.TMPDir -} - -func (t *Tree) isRootPath(path string) bool { - return path == t.options.Root || - path == t.personalSpacesRoot || - path == t.projectSpacesRoot -} - -func (t *Tree) isSpaceRoot(path string) bool { - parent := filepath.Dir(path) - return parent == t.personalSpacesRoot || parent == t.projectSpacesRoot -} - -func (t *Tree) isInternal(path string) bool { - return t.isIndex(path) || strings.Contains(path, lookup.MetadataDir) || t.isTemporary(path) -} - -func isLockFile(path string) bool { - return strings.HasSuffix(path, ".flock") || strings.HasSuffix(path, ".mlock") -} - -func isTrash(path string) bool { - return strings.HasSuffix(path, ".trashinfo") || strings.HasSuffix(path, ".trashitem") || strings.Contains(path, ".Trash") -} diff --git a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/watcher_darwin.go b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/watcher_darwin.go index ec16106e12..9fc424d724 100644 --- a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/watcher_darwin.go +++ b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/watcher_darwin.go @@ -12,6 +12,7 @@ import ( "github.com/fsnotify/fsnotify" "github.com/rs/zerolog" + "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/ignore" "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/options" "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/watcher" ) @@ -212,8 +213,8 @@ func isSubpath(root, p string) bool { // isIgnored checks if the path is ignored by its tree. func isPathIgnored(tree *Tree, path string) bool { - isLockFile := isLockFile(path) - isTrash := isTrash(path) + isLockFile := ignore.IsLockFile(path) + isTrash := ignore.IsTrash(path) isUpload := tree.isUpload(path) isInternal := tree.isInternal(path) diff --git a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/watcher_linux.go b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/watcher_linux.go index 6ba6227127..83658e6d48 100644 --- a/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/watcher_linux.go +++ b/vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/watcher_linux.go @@ -90,7 +90,7 @@ func (iw *InotifyWatcher) Watch(path string) { for { select { case event := <-events: - if iw.tree.isIgnored(event.Filename) { + if iw.tree.Ignorer.IsIgnored(event.Filename) { continue } for _, e := range event.Events { diff --git a/vendor/modules.txt b/vendor/modules.txt index 5513c96374..c2ea5e9969 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1363,7 +1363,7 @@ github.com/opencloud-eu/icap-client # github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d ## explicit; go 1.18 github.com/opencloud-eu/libre-graph-api-go -# github.com/opencloud-eu/reva/v2 v2.46.0 +# github.com/opencloud-eu/reva/v2 v2.46.1-0.20260522083006-063ee129f21e ## explicit; go 1.25.0 github.com/opencloud-eu/reva/v2/cmd/revad/internal/grace github.com/opencloud-eu/reva/v2/cmd/revad/runtime @@ -1651,6 +1651,7 @@ github.com/opencloud-eu/reva/v2/pkg/storage/fs/owncloudsql/filecache github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/blobstore github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/idcache +github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/ignore github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/lookup github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/options github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/timemanager