summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSam Tuke <samtuke@owncloud.com>2012-07-03 18:17:32 +0100
committerSam Tuke <samtuke@owncloud.com>2012-07-03 18:17:32 +0100
commitb1c9785eb3fec9bc12dab8e4984b0b45880e7fa6 (patch)
tree5467788a76be25b2a26ed5a75d2e1058573737d6 /lib
parenta775deaf22ee803ae2ff0dbe1068229d9c819232 (diff)
parentaec6eea235526644be4e0642dd59a3b5f8e9c0e3 (diff)
downloadnextcloud-server-b1c9785eb3fec9bc12dab8e4984b0b45880e7fa6.tar.gz
nextcloud-server-b1c9785eb3fec9bc12dab8e4984b0b45880e7fa6.zip
Merge branch 'master' of gitorious.org:owncloud/owncloud
Conflicts: apps/files_versions/lib/versions.php
Diffstat (limited to 'lib')
-rw-r--r--lib/filesystem.php1
-rw-r--r--lib/filesystemview.php4
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/filesystem.php b/lib/filesystem.php
index 0ab3bd69acd..65318fa3ab6 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -153,6 +153,7 @@ class OC_Filesystem{
if($path[0]!=='/'){
$path='/'.$path;
}
+ $path=str_replace('//', '/',$path);
$foundMountPoint='';
foreach(OC_Filesystem::$mounts as $mountpoint=>$storage){
if($mountpoint==$path){
diff --git a/lib/filesystemview.php b/lib/filesystemview.php
index 99e08c50e75..448663bb081 100644
--- a/lib/filesystemview.php
+++ b/lib/filesystemview.php
@@ -276,7 +276,7 @@ class OC_FilesystemView {
}else{
$source=$this->fopen($path1,'r');
$target=$this->fopen($path2,'w');
- $count=OC_Helper::streamCopy($data,$target);
+ $count=OC_Helper::streamCopy($source,$target);
$storage1=$this->getStorage($path1);
$storage1->unlink($this->getInternalPath($path1));
$result=$count>0;
@@ -314,7 +314,7 @@ class OC_FilesystemView {
}else{
$source=$this->fopen($path1,'r');
$target=$this->fopen($path2,'w');
- $count=OC_Helper::streamCopy($data,$target);
+ $result=OC_Helper::streamCopy($source,$target);
}
OC_Hook::emit( OC_Filesystem::CLASSNAME, OC_Filesystem::signal_post_copy, array( OC_Filesystem::signal_param_oldpath => $path1 , OC_Filesystem::signal_param_newpath=>$path2));
if(!$exists){