fix on part discrimination

This commit is contained in:
Timendum 2016-11-26 11:08:21 +01:00
parent eba6106cf2
commit 17b2a617bc

View file

@ -24,7 +24,7 @@ class FileHandler
$content["name"] = str_replace($folder, "", $file);
$content["size"] = $this->to_human_filesize(filesize($file));
if (substr($content["name"], '.part') !== '.part') {
if (substr($content["name"], -strlen('.part')) !== '.part') {
$files[] = $content;
}
@ -48,7 +48,7 @@ class FileHandler
$content["name"] = str_replace($folder, "", $file);
$content["size"] = $this->to_human_filesize(filesize($file));
if (substr($content["name"], '.part') === '.part') {
if (substr($content["name"], -strlen('.part')) === '.part') {
$files[] = $content;
}