SFTP-Storage: Correctly Sync mtime

Signed-off-by: Marcel Sander <marcel.sander@actidoo.com>
This commit is contained in:
Marcel Sander 2020-08-19 00:24:42 +02:00 committed by Marcel Sander
parent 5ced155032
commit 6ebb83eee9
1 changed files with 1 additions and 4 deletions

View File

@ -406,13 +406,10 @@ class SFTP extends \OC\Files\Storage\Common {
*/
public function touch($path, $mtime=null) {
try {
if (!is_null($mtime)) {
return false;
}
if (!$this->file_exists($path)) {
$this->getConnection()->put($this->absPath($path), '');
} else {
return false;
$this->getConnection()->touch($this->absPath($path), $mtime);
}
} catch (\Exception $e) {
return false;