[Pkg-owncloud-commits] [owncloud] 189/258: Fix copy overwrite for amazon s3
David Prévot
taffit at moszumanska.debian.org
Sat Oct 11 17:22:35 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 67b9edeeb7d624475944f7f4a3f0e338533eb5ed
Author: Robin Appelman <icewind at owncloud.com>
Date: Fri Aug 1 15:05:43 2014 +0200
Fix copy overwrite for amazon s3
---
apps/files_external/lib/amazons3.php | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index 2e0819c..c0ad7f8 100644
--- a/apps/files_external/lib/amazons3.php
+++ b/apps/files_external/lib/amazons3.php
@@ -472,8 +472,10 @@ class AmazonS3 extends \OC\Files\Storage\Common {
return false;
}
} else {
- if ($this->file_exists($path2)) {
- return false;
+ if ($this->is_dir($path2)) {
+ $this->rmdir($path2);
+ } else if ($this->file_exists($path2)) {
+ $this->unlink($path2);
}
try {
@@ -510,11 +512,6 @@ class AmazonS3 extends \OC\Files\Storage\Common {
$path2 = $this->normalizePath($path2);
if ($this->is_file($path1)) {
- if ($this->is_dir($path2)) {
- $this->rmdir($path2);
- } else if ($this->file_exists($path2)) {
- $this->unlink($path2);
- }
if ($this->copy($path1, $path2) === false) {
return false;
@@ -525,11 +522,6 @@ class AmazonS3 extends \OC\Files\Storage\Common {
return false;
}
} else {
- if ($this->is_dir($path2)) {
- $this->rmdir($path2);
- } else if ($this->file_exists($path2)) {
- $this->unlink($path2);
- }
if ($this->copy($path1, $path2) === false) {
return false;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list