diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-05-18 01:54:02 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-05-18 01:54:59 +0200 |
commit | 48505c5626a9558ccc825d8b6d85df5d44e9498d (patch) | |
tree | eb0eb9380410ab47dc59801f769dd50dcb2d0e13 /apps | |
parent | 5b42325b018dbc696ed932f701480715cb4b3ecb (diff) | |
download | nextcloud-server-48505c5626a9558ccc825d8b6d85df5d44e9498d.tar.gz nextcloud-server-48505c5626a9558ccc825d8b6d85df5d44e9498d.zip |
improve tar archive backend
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_archive/lib/storage.php | 2 | ||||
-rw-r--r-- | apps/files_archive/tests/storage.php | 16 |
2 files changed, 16 insertions, 2 deletions
diff --git a/apps/files_archive/lib/storage.php b/apps/files_archive/lib/storage.php index 086a338db25..b8f7d468385 100644 --- a/apps/files_archive/lib/storage.php +++ b/apps/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/apps/files_archive/tests/storage.php b/apps/files_archive/tests/storage.php index 7ebcce4ac6f..74ddf22870c 100644 --- a/apps/files_archive/tests/storage.php +++ b/apps/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); + } +} |