You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/private/Files/Storage/Local.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@
50
50
useOCP\Files\IMimeTypeDetector;
51
51
useOCP\Files\Storage\IStorage;
52
52
useOCP\IConfig;
53
-
useOCP\ILogger;
53
+
usePsr\Log\LoggerInterface;
54
54
55
55
/**
56
56
* for local filestore, we only have to map the paths
@@ -323,17 +323,17 @@ public function rename($path1, $path2) {
323
323
$dstParent = dirname($path2);
324
324
325
325
if (!$this->isUpdatable($srcParent)) {
326
-
\OCP\Util::writeLog('core', 'unable to rename, source directory is not writable : ' . $srcParent, ILogger::ERROR);
326
+
\OC::$server->get(LoggerInterface::class)->error('unable to rename, source directory is not writable : ' . $srcParent, ['app' => 'core']);
327
327
returnfalse;
328
328
}
329
329
330
330
if (!$this->isUpdatable($dstParent)) {
331
-
\OCP\Util::writeLog('core', 'unable to rename, destination directory is not writable : ' . $dstParent, ILogger::ERROR);
331
+
\OC::$server->get(LoggerInterface::class)->error('unable to rename, destination directory is not writable : ' . $dstParent, ['app' => 'core']);
332
332
returnfalse;
333
333
}
334
334
335
335
if (!$this->file_exists($path1)) {
336
-
\OCP\Util::writeLog('core', 'unable to rename, file does not exists : ' . $path1, ILogger::ERROR);
336
+
\OC::$server->get(LoggerInterface::class)->error('unable to rename, file does not exists : ' . $path1, ['app' => 'core']);
337
337
returnfalse;
338
338
}
339
339
@@ -484,7 +484,7 @@ public function getSourcePath($path) {
484
484
return$fullPath;
485
485
}
486
486
487
-
\OCP\Util::writeLog('core', "Following symlinks is not allowed ('$fullPath' -> '$realPath' not inside '{$this->realDataDir}')", ILogger::ERROR);
487
+
\OC::$server->get(LoggerInterface::class)->error("Following symlinks is not allowed ('$fullPath' -> '$realPath' not inside '{$this->realDataDir}')", ['app' => 'core']);
488
488
thrownewForbiddenException('Following symlinks is not allowed', false);
0 commit comments