[lux commit] r122 - trunk/Lux

0 views
Skip to first unread message

codesite...@google.com

unread,
Mar 5, 2008, 12:44:13 AM3/5/08
to lux...@googlegroups.com
Author: rodrigo.moraes
Date: Tue Mar 4 21:43:39 2008
New Revision: 122

Modified:
trunk/Lux/Filesystem.php

Log:
Call Solar_Dir::fix(), so we don't need to worry with slashes in the
passed $to value.

Modified: trunk/Lux/Filesystem.php
==============================================================================
--- trunk/Lux/Filesystem.php (original)
+++ trunk/Lux/Filesystem.php Tue Mar 4 21:43:39 2008
@@ -52,12 +52,15 @@
return;
}

+ // Fix dir name: always end with a slash.
+ $to = Solar_Dir::fix($to);
+
if (! file_exists($to)) {
// Create destination dir.
$this->createDir($to);
}

- $iter = new DirectoryIterator($from);
+ $iter = new DirectoryIterator($from);

foreach ($iter as $file) {
// Ignore dots and links.
@@ -66,7 +69,7 @@
}

// Increment the destination with the filename.
- $new_to = $to . DIRECTORY_SEPARATOR . $file->getFilename();
+ $new_to = $to . $file->getFilename();

// Copy recursivelly.
$this->copyDir($file->getPathname(), $new_to, $ignore);

Reply all
Reply to author
Forward
0 new messages