summaryrefslogtreecommitdiffstats
path: root/lib/private/avatar.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-03-29 18:52:17 +0200
committerRobin Appelman <icewind@owncloud.com>2016-03-30 10:24:43 +0200
commitc22697e09ed063df0d035db36e04f0e0811d599d (patch)
treed4e3cc7146c8c6d7e108adf478901c25ec74ec73 /lib/private/avatar.php
parentdd5bbc31f235b729983e60809841879d0ecaa133 (diff)
downloadnextcloud-server-c22697e09ed063df0d035db36e04f0e0811d599d.tar.gz
nextcloud-server-c22697e09ed063df0d035db36e04f0e0811d599d.zip
only remove avatars from the folder we store them in
Diffstat (limited to 'lib/private/avatar.php')
-rw-r--r--lib/private/avatar.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/avatar.php b/lib/private/avatar.php
index 4b9d3d82404..3f8038360a4 100644
--- a/lib/private/avatar.php
+++ b/lib/private/avatar.php
@@ -134,7 +134,7 @@ class Avatar implements IAvatar {
*/
public function remove () {
$regex = '/^avatar\.([0-9]+\.)?(jpg|png)$/';
- $avatars = $this->folder->search('avatar');
+ $avatars = $this->folder->getDirectoryListing();
foreach ($avatars as $avatar) {
if (preg_match($regex, $avatar->getName())) {