mirror of
https://github.com/misterunknown/ifm.git
synced 2025-01-17 20:58:23 +01:00
Fix bug with adding subdirectories to archive
This commit is contained in:
parent
f5a1261ddc
commit
481cff0f60
@ -32,14 +32,15 @@ class IFMArchive {
|
||||
if ($f != '.' && $f != '..') {
|
||||
$filePath = $folder . '/' . $f;
|
||||
if (file_exists($filePath) && is_readable($filePath))
|
||||
if (is_file($filePath))
|
||||
if (is_file($filePath)) {
|
||||
if (!is_callable($exclude_callback) || $exclude_callback($f))
|
||||
$archive->addFile( $filePath, substr( $filePath, $offset ) );
|
||||
elseif (is_dir($filePath))
|
||||
} elseif (is_dir($filePath)) {
|
||||
if (is_callable($exclude_callback))
|
||||
self::addFolder($archive, $filePath, $offset, $exclude_callback);
|
||||
else
|
||||
self::addFolder($archive, $filePath, $offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
@ -55,7 +56,7 @@ class IFMArchive {
|
||||
if (!is_array($src))
|
||||
$src = array($src);
|
||||
|
||||
file_put_contents("debug.ifm.log", var_export(is_callable($exclude_callback), true)."\n");
|
||||
//file_put_contents("debug.ifm.log", var_export(is_callable($exclude_callback), true)."\n");
|
||||
|
||||
foreach ($src as $s)
|
||||
if (is_dir($s))
|
||||
|
Loading…
x
Reference in New Issue
Block a user