Blob Blame History Raw
--- Net_FTPTest.php.ok	2011-02-09 16:38:24.000000000 +0100
+++ Net_FTPTest.php	2011-02-09 16:38:04.000000000 +0100
@@ -274,7 +296,7 @@
             $this->assertFalse(PEAR::isError($dirlist));
           
             $dirlist   = $this->_getNames($dirlist);
-            $dirlistok = array($this->_getLastPart($tmpfile[$i]), '.', '..');
+            $dirlistok = array($this->_getLastPart($tmpfile[$i]));
             if ($i < 2) {
                 $dirlistok[] = $this->_getLastPart($tmpdir[$i+1]);
             }
@@ -408,7 +430,7 @@
     }
     
     /**
-     * Return all name keys in the elements of an array
+     * Return all name keys in the elements of an array, leaving out . and ..
      *
      * @param array $in Multidimensional array
      *
@@ -418,7 +440,9 @@
     {
         $return = array();
         foreach ($in as $v) {
-            $return[] = $v['name'];
+            if ($v['name'] != '.' && $v['name'] != '..') {
+                $return[] = $v['name'];
+            }
         }
         return $return;
     }