[Pkg-owncloud-commits] [owncloud] 03/10: Don't use command concatenation

David Prévot taffit at moszumanska.debian.org
Tue Jun 23 23:39:28 UTC 2015


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

taffit pushed a commit to annotated tag v6.0.9beta
in repository owncloud.

commit b49deb6d7995ea335ed5e432c8de3136e16a7f93
Author: Lukas Reschke <lukas at owncloud.com>
Date:   Wed Jun 10 14:46:42 2015 +0200

    Don't use command concatenation
    
    Possibly fixes https://github.com/owncloud/core/issues/16853
---
 apps/files_external/3rdparty/smb4php/smb.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/apps/files_external/3rdparty/smb4php/smb.php b/apps/files_external/3rdparty/smb4php/smb.php
index 456f1a1..02b25b6 100644
--- a/apps/files_external/3rdparty/smb4php/smb.php
+++ b/apps/files_external/3rdparty/smb4php/smb.php
@@ -318,14 +318,14 @@ class smb {
 			trigger_error('rename(): error in URL', E_USER_ERROR);
 		}
 		smb::clearstatcache ($url_from);
-		$cmd = '';
 		// check if target file exists
 		if (smb::url_stat($url_to)) {
 			// delete target file first
-			$cmd = 'del "' . $to['path'] . '"; ';
+			$cmd = 'del "' . $to['path'] . '"';
+			smb::execute($cmd, $to);
 			$replace = true;
 		}
-		$cmd .= 'rename "' . $from['path'] . '" "' . $to['path'] . '"';
+		$cmd = 'rename "' . $from['path'] . '" "' . $to['path'] . '"';
 		$result = smb::execute($cmd, $to);
 		if ($replace) {
 			// clear again, else the cache will return the info

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