From e49521172f06ff5a9f98fc9af2806e7a7bb0c525 Mon Sep 17 00:00:00 2001 From: Frank de Jonge Date: Sun, 16 Feb 2014 11:47:47 +0100 Subject: [PATCH] [Dropbox] When a path is empty, ensure a leading slash. --- src/Adapter/Dropbox.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Adapter/Dropbox.php b/src/Adapter/Dropbox.php index 62695416a..b780c2e40 100644 --- a/src/Adapter/Dropbox.php +++ b/src/Adapter/Dropbox.php @@ -211,7 +211,7 @@ public function listContents($directory = '', $recursive = false) $listing = array(); $directory = trim($directory, '/.'); $prefixLength = strlen($this->prefix); - $location = rtrim($this->prefix($directory), '/'); + $location = '/' . trim($this->prefix($directory), '/'); if ( ! $result = $this->client->getMetadataWithChildren($location)) { return array();