1 From 14c760124fd0eb92684297c587769cea1d11f2f2 Mon Sep 17 00:00:00 2001 |
|
2 From: Lukas Reschke <lukas@owncloud.com> |
|
3 Date: Wed, 10 Jun 2015 14:46:42 +0200 |
|
4 Subject: [PATCH] Don't use command concatenation |
|
5 |
|
6 Possibly fixes https://github.com/owncloud/core/issues/16853 |
|
7 --- |
|
8 apps/files_external/3rdparty/smb4php/smb.php | 6 +++--- |
|
9 1 file changed, 3 insertions(+), 3 deletions(-) |
|
10 |
|
11 diff --git a/apps/files_external/3rdparty/smb4php/smb.php b/apps/files_external/3rdparty/smb4php/smb.php |
|
12 index 7ffdb42..5db663b 100644 |
|
13 --- a/apps/files_external/3rdparty/smb4php/smb.php |
|
14 +++ b/apps/files_external/3rdparty/smb4php/smb.php |
|
15 @@ -324,14 +324,14 @@ function rename ($url_from, $url_to) { |
|
16 trigger_error('rename(): error in URL', E_USER_ERROR); |
|
17 } |
|
18 smb::clearstatcache ($url_from); |
|
19 - $cmd = ''; |
|
20 // check if target file exists |
|
21 if (smb::url_stat($url_to)) { |
|
22 // delete target file first |
|
23 - $cmd = 'del "' . $to['path'] . '"; '; |
|
24 + $cmd = 'del "' . $to['path'] . '"'; |
|
25 + smb::execute($cmd, $to); |
|
26 $replace = true; |
|
27 } |
|
28 - $cmd .= 'rename "' . $from['path'] . '" "' . $to['path'] . '"'; |
|
29 + $cmd = 'rename "' . $from['path'] . '" "' . $to['path'] . '"'; |
|
30 $result = smb::execute($cmd, $to); |
|
31 if ($replace) { |
|
32 // clear again, else the cache will return the info |
|