mirror of
https://github.com/misterunknown/ifm.git
synced 2025-08-09 17:46:31 +02:00
Fix if statements
Signed-off-by: Marco Dickert <marco@misterunknown.de>
This commit is contained in:
@@ -31,15 +31,17 @@ class IFMArchive {
|
||||
while (false !== $f = readdir($handle)) {
|
||||
if ($f != '.' && $f != '..') {
|
||||
$filePath = $folder . '/' . $f;
|
||||
if (file_exists($filePath) && is_readable($filePath))
|
||||
if (is_file($filePath))
|
||||
if (file_exists($filePath) && is_readable($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);
|
||||
|
Reference in New Issue
Block a user