diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index e91c15cc62a1917c81b2965c62f19d609ac0c64b..11f180bf7e623d6b1677be09bb2e6bd1a4aa04c0 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -169,9 +169,8 @@ class Shared_Cache extends Cache {
 	 * @return int file id
 	 */
 	public function put($file, array $data) {
-		if ($file === '' && isset($data['etag'])) {
-			return \OCP\Config::setUserValue(\OCP\User::getUser(), 'files_sharing', 'etag', $data['etag']);
-		} else if ($cache = $this->getSourceCache($file)) {
+		$file = ($file === false) ? '' : $file;
+		if ($cache = $this->getSourceCache($file)) {
 			return $cache->put($this->files[$file], $data);
 		}
 		return false;
@@ -368,6 +367,7 @@ class Shared_Cache extends Cache {
 	 * @return int
 	 */
 	public function calculateFolderSize($path, $entry = null) {
+		$path = ($path === false) ? '' : $path;
 		if ($cache = $this->getSourceCache($path)) {
 			return $cache->calculateFolderSize($this->files[$path]);
 		}
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index 3a31e965548acb2731f7e65fa3799307b5772701..8254f0e05caf5dc4cfac87ade4bdd9e9801cb8ac 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -272,9 +272,7 @@ class Shared extends \OC\Files\Storage\Common {
 
 	public function unlink($path) {
 		// Delete the file if DELETE permission is granted
-		if ($path == '') {
-			$path = $this->mountPoint;
-		}
+		$path = ($path === false) ? '' : $path;
 		if ($source = $this->getSourcePath($path)) {
 			if ($this->isDeletable($path)) {
 				list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($source);