Skip to content

Commit

Permalink
SFTP-Storage: Correctly Sync mtime
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Sander <[email protected]>
  • Loading branch information
msander committed Aug 23, 2020
1 parent 5ced155 commit 9340fdb
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions apps/files_external/lib/Lib/Storage/SFTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,19 +405,7 @@ public function fopen($path, $mode) {
* {@inheritdoc}
*/
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;
}
} catch (\Exception $e) {
return false;
}
return true;
return $this->getConnection()->touch($this->absPath($path), $mtime);
}

/**
Expand Down

0 comments on commit 9340fdb

Please sign in to comment.