[dev] VFS_FTP patch

Tarjei Huse tarjei+a_lists.phpgw at nu.no
Fri Jan 23 09:14:06 PST 2004


Hi, this patch solved a problem for me where filenames in my directories were
not handled correctly. 

I am not sure if it works in all situations, but I submit it here so that
otheres might understand the problem. 
Tarjei

--- ../framework/VFS/VFS/ftp.php        2004-01-23 17:54:54.000000000 +0100
+++ /usr/share/php/VFS/ftp.php  2004-01-23 18:10:54.000000000 +0100
@@ -392,7 +392,8 @@
                 $file['perms'] = $item[0];
                 $file['owner'] = $item[2];
                 $file['group'] = $item[3];
-                $file['name'] = substr($line, strpos($line, sprintf("%s %2s
%5s", $item[5], $item[6], $item[7])) + 13);
+                $file['name'] = implode (" ", array_slice($item, 9));
+
                 // Filter out '.' and '..' entries.
                 if (preg_match('/^\.\.?\/?$/', $file['name'])) {
                     continue;



More information about the dev mailing list