summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-12-02 12:13:32 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2013-12-02 12:13:32 +0100
commitfac2f2a6261e53f7948731291c011f21143891cd (patch)
tree2f59d985b7acd3da6a0cd5e52ad441e868c80b77 /apps/files_trashbin
parentedc4447d6a285d778ae2ff242877fc98fdcaa2ba (diff)
downloadnextcloud-server-fac2f2a6261e53f7948731291c011f21143891cd.tar.gz
nextcloud-server-fac2f2a6261e53f7948731291c011f21143891cd.zip
check explicitely all possible dir values
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r--apps/files_trashbin/ajax/delete.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_trashbin/ajax/delete.php b/apps/files_trashbin/ajax/delete.php
index 7b41eb1ea80..75d481768ad 100644
--- a/apps/files_trashbin/ajax/delete.php
+++ b/apps/files_trashbin/ajax/delete.php
@@ -7,11 +7,12 @@ OCP\JSON::callCheck();
if (isset($_POST['allfiles']) and $_POST['allfiles'] === 'true'){
$deleteAll = true;
$folder = isset($_POST['dir']) ? $_POST['dir'] : '/';
- if ($folder === '/') {
+ if ($folder === '/' || $folder === '') {
OCA\Files_Trashbin\Trashbin::deleteAll();
$list = array();
} else {
- if ( strlen(dirname($folder)) > 1 ) {
+ $dirname = dirname($folder);
+ if ( $dirname !== '/' && $dirname !== '.' ) {
$dirlisting = '1';
} else {
$dirlisting = '0';