diff --git a/apps/files_archive/lib/storage.php b/apps/files_archive/lib/storage.php
index add00ed8d8eb2e3b472bfc7d5b5e4a3436d9611e..a3271dc390fa5dc2fb20db6288c96c5c30ffc5da 100644
--- a/apps/files_archive/lib/storage.php
+++ b/apps/files_archive/lib/storage.php
@@ -39,11 +39,18 @@ class OC_Filestorage_Archive extends OC_Filestorage_Common{
 	}
 	public function opendir($path){
 		$path=$this->stripPath($path);
-		$content=$this->archive->getFolder($path);
-		foreach($content as &$file){
+		if(substr($path,-1)!=='/'){
+			$path.='/';
+		}
+		$files=$this->archive->getFolder($path);
+		$content=array();
+		foreach($files as $file){
 			if(substr($file,-1)=='/'){
 				$file=substr($file,0,-1);
 			}
+			if($file and strpos($file,'/')===false){
+				$content[]=$file;
+			}
 		}
 		$id=md5($this->path.$path);
 		OC_FakeDirStream::$dirs[$id]=$content;