Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit c2566f9

Browse files
committed
Fix issue with .zip.zip extension #953
1 parent b3d217e commit c2566f9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

core/src/core/classes/class.UserSelection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public function isEmpty()
277277
public static function detectZip($dirPath)
278278
{
279279
if (preg_match("/\.zip\//i", $dirPath) || preg_match("/\.zip$/i", $dirPath)) {
280-
$contExt = strpos(strtolower($dirPath), ".zip");
280+
$contExt = strrpos(strtolower($dirPath), ".zip");
281281
$zipPath = substr($dirPath, 0, $contExt+4);
282282
$localPath = substr($dirPath, $contExt+4);
283283
if($localPath == "") $localPath = "/";

core/src/plugins/access.fs/class.fsAccessWrapper.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,12 @@ public function dir_rewinddir ()
470470
}
471471
}
472472

473+
/**
474+
* @return bool|float
475+
*/
473476
public static function getLastRealSize()
474477
{
478+
if(empty(self::$lastRealSize)) return false;
475479
return self::$lastRealSize;
476480
}
477481

0 commit comments

Comments
 (0)