mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-05-20 06:26:40 +02:00
Compare commits
3 commits
261dc7d022
...
d18fde669e
Author | SHA1 | Date | |
---|---|---|---|
d18fde669e | |||
a1ae0fa729 | |||
a6781936da |
|
@ -958,7 +958,7 @@ if (!empty($_FILES) && !FM_READONLY) {
|
|||
|
||||
$targetPath = $path . $ds;
|
||||
if ( is_writable($targetPath) ) {
|
||||
$fullPath = $path . '/' . basename($fullPathInput);
|
||||
$fullPath = $path . '/' . $fullPathInput;
|
||||
$folder = substr($fullPath, 0, strrpos($fullPath, "/"));
|
||||
|
||||
if (!is_dir($folder)) {
|
||||
|
@ -2692,22 +2692,23 @@ function fm_get_directorysize($directory) {
|
|||
* @return array|bool
|
||||
*/
|
||||
function fm_get_zif_info($path, $ext) {
|
||||
if ($ext == 'zip' && function_exists('zip_open')) {
|
||||
$arch = @zip_open($path);
|
||||
if ($arch) {
|
||||
if ($ext == 'zip' && class_exists('ZipArchive')) {
|
||||
$arch = new ZipArchive;
|
||||
if ($arch->open($path)) {
|
||||
$filenames = array();
|
||||
while ($zip_entry = @zip_read($arch)) {
|
||||
$zip_name = @zip_entry_name($zip_entry);
|
||||
$zip_folder = substr($zip_name, -1) == '/';
|
||||
$filenames[] = array(
|
||||
'name' => $zip_name,
|
||||
'filesize' => @zip_entry_filesize($zip_entry),
|
||||
'compressed_size' => @zip_entry_compressedsize($zip_entry),
|
||||
|
||||
for($i = 0; $i < $arch->numFiles; $i++ ){
|
||||
$stat = $arch->statIndex($i);
|
||||
$zip_folder = substr($stat['name'], -1) == '/';
|
||||
$filenames[] = array(
|
||||
'name' => $stat['name'],
|
||||
'filesize' => $stat['size'],
|
||||
'compressed_size' => $stat['comp_size'],
|
||||
'folder' => $zip_folder
|
||||
//'compression_method' => zip_entry_compressionmethod($zip_entry),
|
||||
//'compression_method' => $stat['comp_method'],
|
||||
);
|
||||
}
|
||||
@zip_close($arch);
|
||||
}
|
||||
$arch->close();
|
||||
return $filenames;
|
||||
}
|
||||
} elseif($ext == 'tar' && class_exists('PharData')) {
|
||||
|
|
Loading…
Reference in a new issue