[Pkg-owncloud-commits] [owncloud] 162/239: Fixed SFTP storage to overwrite on rename

David Prévot taffit at moszumanska.debian.org
Fri Nov 29 01:32:33 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 30e086fb530c1c0d951fe58266cd5aed21fd91be
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Tue Nov 26 16:32:44 2013 +0100

    Fixed SFTP storage to overwrite on rename
---
 apps/files_external/lib/sftp.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php
index bcc4c5e..95e0cef 100644
--- a/apps/files_external/lib/sftp.php
+++ b/apps/files_external/lib/sftp.php
@@ -285,6 +285,9 @@ class SFTP extends \OC\Files\Storage\Common {
 
 	public function rename($source, $target) {
 		try {
+			if (!$this->is_dir($target) && $this->file_exists($target)) {
+				$this->unlink($target);
+			}
 			return $this->client->rename(
 				$this->absPath($source),
 				$this->absPath($target)

-- 
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