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

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin <robin@Amaya.(none)>2010-05-23 00:08:08 +0400
committerRobin <robin@Amaya.(none)>2010-05-23 00:08:08 +0400
commitd909f91d07deae7e5e438496dee82075dae24cdb (patch)
tree3bc24bc6e72c9e9605afa74a06944a78ec9946dd /inc/lib_filestorage.php
parent086f060b9ebb16d0f28b50e472d849ba5332483a (diff)
small webdav fixes
Diffstat (limited to 'inc/lib_filestorage.php')
-rw-r--r--inc/lib_filestorage.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/inc/lib_filestorage.php b/inc/lib_filestorage.php
index 3c34cc21102..8448eddd74a 100644
--- a/inc/lib_filestorage.php
+++ b/inc/lib_filestorage.php
@@ -104,7 +104,7 @@ class OC_FILESTORAGE_LOCAL extends OC_FILESTORAGE{
return $return;
}
public function is_dir($path){
- return is_dir($this->datadir.$path);
+ return (is_dir($this->datadir.$path) or substr($path,-1)=='/');
}
public function is_file($path){
return is_file($this->datadir.$path);
@@ -166,7 +166,19 @@ class OC_FILESTORAGE_LOCAL extends OC_FILESTORAGE{
return $return;
}
public function copy($path1,$path2){
+ if($this->is_dir($path2)){
+ if(!$this->file_exists($path2)){
+ $this->mkdir($path2);
+ }
+ $source=substr($path1,strrpos($path1,'/')+1);
+ $path2.=$source;
+// sleep(30);
+ }else{
+ error_log('isfile');
+ }
+ error_log("copy $path1 to {$this->datadir}$path2");
if($return=copy($this->datadir.$path1,$this->datadir.$path2)){
+ error_log('success');
$this->notifyObservers($path2,OC_FILEACTION_CREATE);
}
return $return;
@@ -346,7 +358,11 @@ class OC_FILESTORAGE_LOCAL extends OC_FILESTORAGE{
}
public function find($path){
- return System::find($this->datadir.$path);
+ $return=System::find($this->datadir.$path);
+ foreach($return as &$file){
+ $file=str_replace($file,$this->datadir,'');
+ }
+ return $return;
}
}
?> \ No newline at end of file