SHA256
1
0
forked from pool/findutils
findutils/findutils-4.4.2-fts-remount.patch
OBS User autobuild d6d436937f Accepting request 34356 from Base:System
Copy from Base:System/findutils based on submit request 34356 from user prusnak

OBS-URL: https://build.opensuse.org/request/show/34356
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/findutils?expand=0&rev=17
2010-03-12 15:45:17 +00:00

28 lines
986 B
Diff

This patch is already applied on gnulib upstream git.
Index: findutils-4.4.2/gnulib/lib/fts.c
===================================================================
--- findutils-4.4.2.orig/gnulib/lib/fts.c
+++ findutils-4.4.2/gnulib/lib/fts.c
@@ -974,6 +974,20 @@ fts_build (register FTS *sp, int type)
opening it. */
if (cur->fts_info == FTS_NSOK)
cur->fts_info = fts_stat(sp, cur, false);
+ else if (sp->fts_options & FTS_TIGHT_CYCLE_CHECK) {
+ /* Now read the stat info again after opening a directory to
+ * reveal eventual changes caused by a submount triggered by
+ * the traverse. But do it only for utilities which use
+ * FTS_TIGHT_CYCLE_CHECK. Therefore only find and du can
+ * benefit from this feature for now.
+ */
+ LEAVE_DIR (sp, cur, "4");
+ fts_stat (sp, cur, false);
+ if (! enter_dir (sp, cur)) {
+ __set_errno (ENOMEM);
+ return NULL;
+ }
+ }
/*
* Nlinks is the number of possible entries of type directory in the