aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/Lib/Storage/SMB.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php
index fc1f9b9ecd1..fe5f3adb25e 100644
--- a/apps/files_external/lib/Lib/Storage/SMB.php
+++ b/apps/files_external/lib/Lib/Storage/SMB.php
@@ -198,7 +198,7 @@ class SMB extends Common implements INotifyStorage {
try {
$acls = $file->getAcls();
} catch (Exception $e) {
- $this->logger->error('Error while getting file acls', ['exception' => $e]);
+ $this->logger->warning('Error while getting file acls', ['exception' => $e]);
return null;
}
foreach ($acls as $user => $acl) {
@@ -426,6 +426,7 @@ class SMB extends Common implements INotifyStorage {
case 'r':
case 'rb':
if (!$this->file_exists($path)) {
+ $this->logger->warning('Failed to open ' . $path . ' on ' . $this->getId() . ', file doesn\'t exist.');
return false;
}
return $this->share->read($fullPath);
@@ -453,11 +454,13 @@ class SMB extends Common implements INotifyStorage {
}
if ($this->file_exists($path)) {
if (!$this->isUpdatable($path)) {
+ $this->logger->warning('Failed to open ' . $path . ' on ' . $this->getId() . ', file not updatable.');
return false;
}
$tmpFile = $this->getCachedFile($path);
} else {
if (!$this->isCreatable(dirname($path))) {
+ $this->logger->warning('Failed to open ' . $path . ' on ' . $this->getId() . ', parent directory not writable.');
return false;
}
$tmpFile = \OCP\Server::get(ITempManager::class)->getTemporaryFile($ext);
@@ -472,13 +475,16 @@ class SMB extends Common implements INotifyStorage {
}
return false;
} catch (NotFoundException $e) {
+ $this->logger->warning('Failed to open ' . $path . ' on ' . $this->getId() . ', not found.', ['exception' => $e]);
return false;
} catch (ForbiddenException $e) {
+ $this->logger->warning('Failed to open ' . $path . ' on ' . $this->getId() . ', forbidden.', ['exception' => $e]);
return false;
} catch (OutOfSpaceException $e) {
+ $this->logger->warning('Failed to open ' . $path . ' on ' . $this->getId() . ', out of space.', ['exception' => $e]);
throw new EntityTooLargeException('not enough available space to create file', 0, $e);
} catch (ConnectException $e) {
- $this->logger->error('Error while opening file', ['exception' => $e]);
+ $this->logger->error('Error while opening file ' . $path . ' on ' . $this->getId(), ['exception' => $e]);
throw new StorageNotAvailableException($e->getMessage(), (int)$e->getCode(), $e);
}
}