]> source.dussan.org Git - nextcloud-server.git/commitdiff
OC\Preview - fix logic of two return values
authorGeorg Ehrke <developer@georgehrke.com>
Thu, 11 Jul 2013 18:15:30 +0000 (20:15 +0200)
committerGeorg Ehrke <developer@georgehrke.com>
Thu, 11 Jul 2013 18:15:30 +0000 (20:15 +0200)
lib/preview.php

index fba1d893e086a26f9adfa6803196db533e066428..cc287595f400d1856b4259b05f070c0a8a45ad85 100755 (executable)
@@ -250,7 +250,7 @@ class Preview {
 
                $previewpath = $this->getThumbnailsFolder() . '/' . $fileid . '/' . $this->getMaxX() . '-' . $this->getMaxY() . '.png';
                $this->userview->unlink($previewpath);
-               return $this->userview->file_exists($previewpath);
+               return !$this->userview->file_exists($previewpath);
        }
 
        /**
@@ -266,7 +266,7 @@ class Preview {
                $previewpath = $this->getThumbnailsFolder() . '/' . $fileid . '/';
                $this->userview->deleteAll($previewpath);
                $this->userview->rmdir($previewpath);
-               return $this->userview->is_dir($previewpath);
+               return !$this->userview->is_dir($previewpath);
        }
 
        /**