SFTP-Storage: Correctly Sync mtime
Signed-off-by: Marcel Sander <marcel.sander@actidoo.com>
This commit is contained in:
parent
5ced155032
commit
6ebb83eee9
|
@ -406,13 +406,10 @@ class SFTP extends \OC\Files\Storage\Common {
|
||||||
*/
|
*/
|
||||||
public function touch($path, $mtime=null) {
|
public function touch($path, $mtime=null) {
|
||||||
try {
|
try {
|
||||||
if (!is_null($mtime)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!$this->file_exists($path)) {
|
if (!$this->file_exists($path)) {
|
||||||
$this->getConnection()->put($this->absPath($path), '');
|
$this->getConnection()->put($this->absPath($path), '');
|
||||||
} else {
|
} else {
|
||||||
return false;
|
$this->getConnection()->touch($this->absPath($path), $mtime);
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue