|
@@ 181-189 (lines=9) @@
|
| 178 |
|
elseif (substr($current['filename'], -1, 1) != '/') |
| 179 |
|
$write_this = $overwrite || filemtime($destination . '/' . $current['filename']) < $current['mtime']; |
| 180 |
|
// Folder... create. |
| 181 |
|
elseif ($destination !== null && !$single_file) |
| 182 |
|
{ |
| 183 |
|
// Protect from accidental parent directory writing... |
| 184 |
|
$current['filename'] = strtr($current['filename'], array('../' => '', '/..' => '')); |
| 185 |
|
|
| 186 |
|
if (!file_exists($destination . '/' . $current['filename'])) |
| 187 |
|
mktree($destination . '/' . $current['filename'], 0777); |
| 188 |
|
$write_this = false; |
| 189 |
|
} |
| 190 |
|
else |
| 191 |
|
$write_this = false; |
| 192 |
|
|
|
@@ 387-395 (lines=9) @@
|
| 384 |
|
elseif (substr($file_info['filename'], -1) != '/') |
| 385 |
|
$write_this = $overwrite; |
| 386 |
|
// This is a directory, so we're gonna want to create it. (probably...) |
| 387 |
|
elseif ($destination !== null && !$single_file) |
| 388 |
|
{ |
| 389 |
|
// Just a little accident prevention, don't mind me. |
| 390 |
|
$file_info['filename'] = strtr($file_info['filename'], array('../' => '', '/..' => '')); |
| 391 |
|
|
| 392 |
|
if (!file_exists($destination . '/' . $file_info['filename'])) |
| 393 |
|
mktree($destination . '/' . $file_info['filename'], 0777); |
| 394 |
|
$write_this = false; |
| 395 |
|
} |
| 396 |
|
else |
| 397 |
|
$write_this = false; |
| 398 |
|
|