This commit is contained in:
Marcel Sander 2021-06-03 15:13:19 +02:00 committed by GitHub
commit 83048347b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -407,13 +407,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;