[25003] trunk/base/src/pextlib1.0

source_changes at macosforge.org source_changes at macosforge.org
Thu May 10 23:35:21 PDT 2007


Revision: 25003
          http://trac.macosforge.org/projects/macports/changeset/25003
Author:   eridius at macports.org
Date:     2007-05-10 23:35:19 -0700 (Thu, 10 May 2007)

Log Message:
-----------
fs-traverse no longer follows symlinks specified as a root path (fixes #11862)

Modified Paths:
--------------
    trunk/base/src/pextlib1.0/fs-traverse.c
    trunk/base/src/pextlib1.0/tests/fs-traverse.tcl

Modified: trunk/base/src/pextlib1.0/fs-traverse.c
===================================================================
--- trunk/base/src/pextlib1.0/fs-traverse.c	2007-05-11 06:15:11 UTC (rev 25002)
+++ trunk/base/src/pextlib1.0/fs-traverse.c	2007-05-11 06:35:19 UTC (rev 25003)
@@ -133,7 +133,7 @@
     FTS *root_fts;
     FTSENT *ent;
     
-    root_fts = fts_open(targets, FTS_PHYSICAL | FTS_COMFOLLOW | FTS_NOCHDIR | FTS_XDEV, NULL);
+    root_fts = fts_open(targets, FTS_PHYSICAL /*| FTS_COMFOLLOW */| FTS_NOCHDIR | FTS_XDEV, NULL);
     
     while ((ent = fts_read(root_fts)) != NULL) {
         switch (ent->fts_info) {

Modified: trunk/base/src/pextlib1.0/tests/fs-traverse.tcl
===================================================================
--- trunk/base/src/pextlib1.0/tests/fs-traverse.tcl	2007-05-11 06:15:11 UTC (rev 25002)
+++ trunk/base/src/pextlib1.0/tests/fs-traverse.tcl	2007-05-11 06:35:19 UTC (rev 25003)
@@ -33,6 +33,13 @@
         }
         check_output $output $trees(sub1)
         
+        # Test starting with a slash-ended symlink
+        set output [list]
+        fs-traverse file $root/a/c/a/ {
+            lappend output $file
+        }
+        check_output $output $trees(sub2)
+        
         # Test -depth
         set output [list]
         fs-traverse -depth file $root {
@@ -226,12 +233,16 @@
     
     set trees(sub1) "
         $root/a/c/a     {link ../d}
-        $root/a/c/a/a   file
-        $root/a/c/a/b   {link ../../b/a}
-        $root/a/c/a/c   directory
-        $root/a/c/a/d   file
     "
     
+    set trees(sub2) "
+        $root/a/c/a/     {link ../d}
+        $root/a/c/a//a   file
+        $root/a/c/a//b   {link ../../b/a}
+        $root/a/c/a//c   directory
+        $root/a/c/a//d   file
+    "
+    
     set trees(2) "
         $root/a/a       file
         $root/a/b       file

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070510/7692bc9c/attachment.html


More information about the macports-changes mailing list