diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-05-18 03:54:02 +0400 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-05-18 03:54:59 +0400 |
commit | 546046a2c3da966312e5659c2d66da343b9f498f (patch) | |
tree | 4ff14267eebd49872825a52ba2471e307ace295e /files_archive | |
parent | 0897b1bc0b5dc63c2d12b2366550de68d32c4b0c (diff) |
improve tar archive backend
Diffstat (limited to 'files_archive')
-rw-r--r-- | files_archive/lib/storage.php | 2 | ||||
-rw-r--r-- | files_archive/tests/storage.php | 16 |
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); + } +} |