Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/apps.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-05-18 03:54:02 +0400
committerRobin Appelman <icewind@owncloud.com>2012-05-18 03:54:59 +0400
commit546046a2c3da966312e5659c2d66da343b9f498f (patch)
tree4ff14267eebd49872825a52ba2471e307ace295e /files_archive
parent0897b1bc0b5dc63c2d12b2366550de68d32c4b0c (diff)
improve tar archive backend
Diffstat (limited to 'files_archive')
-rw-r--r--files_archive/lib/storage.php2
-rw-r--r--files_archive/tests/storage.php16
2 files changed, 16 insertions, 2 deletions
diff --git a/files_archive/lib/storage.php b/files_archive/lib/storage.php
index 086a338db..b8f7d4683 100644
--- a/files_archive/lib/storage.php
+++ b/files_archive/lib/storage.php
@@ -89,7 +89,7 @@ class OC_Filestorage_Archive extends OC_Filestorage_Common{
if($path==''){
return file_exists($this->path);
}
- return $this->archive->fileExists($path) or $this->archive->fileExists($path.'/');
+ return $this->archive->fileExists($path);
}
public function unlink($path){
$path=$this->stripPath($path);
diff --git a/files_archive/tests/storage.php b/files_archive/tests/storage.php
index 7ebcce4ac..74ddf2287 100644
--- a/files_archive/tests/storage.php
+++ b/files_archive/tests/storage.php
@@ -22,4 +22,18 @@ class Test_Filestorage_Archive_Zip extends Test_FileStorage {
}
}
-?> \ No newline at end of file
+class Test_Filestorage_Archive_Tar extends Test_FileStorage {
+ /**
+ * @var string tmpDir
+ */
+ private $tmpFile;
+
+ public function setUp(){
+ $this->tmpFile=OCP\Files::tmpFile('.tar.gz');
+ $this->instance=new OC_Filestorage_Archive(array('archive'=>$this->tmpFile));
+ }
+
+ public function tearDown(){
+ unlink($this->tmpFile);
+ }
+}