diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-04-03 12:00:53 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-04-03 12:00:53 +0200 |
commit | c7324f7e44d1d1bd5c39a9b967dff76b274b9048 (patch) | |
tree | 04040eb1327f05badba6e8215e1be9eb8f6231da /lib/private/preview.php | |
parent | b9a8bd7e1f6f99fe5d26e1693d13ebc6ddf81777 (diff) | |
download | nextcloud-server-c7324f7e44d1d1bd5c39a9b967dff76b274b9048.tar.gz nextcloud-server-c7324f7e44d1d1bd5c39a9b967dff76b274b9048.zip |
fix float comparison for negative results
Diffstat (limited to 'lib/private/preview.php')
-rwxr-xr-x | lib/private/preview.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/preview.php b/lib/private/preview.php index 36cc5d9a2e0..71c16687fb9 100755 --- a/lib/private/preview.php +++ b/lib/private/preview.php @@ -109,7 +109,7 @@ class Preview { * @brief returns the path of the file you want a thumbnail from * @return string */ - public function getFile() { + public function getFile() { return $this->file; } @@ -384,7 +384,7 @@ class Preview { $name = rtrim($thumbnail['name'], '.png'); list($x, $y, $aspectRatio) = $this->getDimensionsFromFilename($name); - if (($aspectRatio - $wantedAspectRatio) >= 0.000001 + if (abs($aspectRatio - $wantedAspectRatio) >= 0.000001 || $this->unscalable($x, $y) ) { continue; |