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-08-19 08:29:57 +0400
committerRobin Appelman <icewind@owncloud.com>2012-08-19 08:29:57 +0400
commit771d2ea6eafa956d9bb85310a13b4a62aba56bb6 (patch)
tree26fe027166698035dbae4c1076958876f7231af3 /files_archive
parentcca6488d54c2aced90117f2ceb1d49551247d609 (diff)
improve hasUpdated for archive storage backend
Diffstat (limited to 'files_archive')
-rw-r--r--files_archive/lib/storage.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/files_archive/lib/storage.php b/files_archive/lib/storage.php
index cd750427a..ca36e76b4 100644
--- a/files_archive/lib/storage.php
+++ b/files_archive/lib/storage.php
@@ -61,6 +61,7 @@ class OC_Filestorage_Archive extends OC_Filestorage_Common{
$path=$this->stripPath($path);
if($path==''){
$stat=stat($this->path);
+ $stat['size']=0;
}else{
if($this->is_dir($path)){
$stat=array('size'=>0);
@@ -69,6 +70,9 @@ class OC_Filestorage_Archive extends OC_Filestorage_Common{
$stat=array();
$stat['mtime']=$this->archive->mtime($path);
$stat['size']=$this->archive->filesize($path);
+ if(!$stat['mtime']){
+ $stat['mtime']=time();
+ }
}
}
$stat['ctime']=$ctime;
@@ -163,4 +167,8 @@ class OC_Filestorage_Archive extends OC_Filestorage_Common{
public function rename($path1,$path2){
return $this->archive->rename($path1,$path2);
}
+
+ public function hasUpdated($path,$time){
+ return $this->filemtime($this->path)>$time;
+ }
}