summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2019-06-21 17:14:27 +0200
committerGitHub <noreply@github.com>2019-06-21 17:14:27 +0200
commit1ad95caf24870dfb6d5cf36fa5822046522559ac (patch)
treede6b2fd7b0e473cb31e61b3639a3c7e1d87a9e92 /lib/private
parent9d121985dc2980ca9c3b4a69d807926d2424757d (diff)
parent000898d932abd60ef1ae9f2167c437864f19087a (diff)
downloadnextcloud-server-1ad95caf24870dfb6d5cf36fa5822046522559ac.tar.gz
nextcloud-server-1ad95caf24870dfb6d5cf36fa5822046522559ac.zip
Merge pull request #15889 from nextcloud/touch-handle-backend-exceptions
handle storage exceptions when trying to set mtime
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/View.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index fef6153fb9a..2516b782ee7 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -566,7 +566,12 @@ class View {
$hooks[] = 'create';
$hooks[] = 'write';
}
- $result = $this->basicOperation('touch', $path, $hooks, $mtime);
+ try {
+ $result = $this->basicOperation('touch', $path, $hooks, $mtime);
+ } catch (\Exception $e) {
+ $this->logger->logException($e, ['level' => ILogger::INFO, 'message' => 'Error while setting modified time']);
+ $result = false;
+ }
if (!$result) {
// If create file fails because of permissions on external storage like SMB folders,
// check file exists and return false if not.