[Pkg-owncloud-commits] [owncloud] 172/258: catch and log exception in OC_Helper::cleanTmp()
David Prévot
taffit at moszumanska.debian.org
Sat Oct 11 17:22:33 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 7d389b26f94c130fc6bd8958edb80e07048e89b2
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Fri Sep 26 09:17:47 2014 +0200
catch and log exception in OC_Helper::cleanTmp()
---
lib/private/helper.php | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/lib/private/helper.php b/lib/private/helper.php
index 8764a6b..3323322 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -643,15 +643,33 @@ class OC_Helper {
if (file_exists($leftoversFile)) {
$leftovers = file($leftoversFile);
foreach ($leftovers as $file) {
- self::rmdirr($file);
+ try {
+ self::rmdirr($file);
+ } catch (UnexpectedValueException $ex) {
+ // not really much we can do here anymore
+ if (!is_null(\OC::$server)) {
+ $message = $ex->getMessage();
+ \OC::$server->getLogger()->error("Error deleting file/folder: $file - Reason: $message",
+ array('app' => 'core'));
+ }
+ }
}
unlink($leftoversFile);
}
foreach (self::$tmpFiles as $file) {
if (file_exists($file)) {
- if (!self::rmdirr($file)) {
- file_put_contents($leftoversFile, $file . "\n", FILE_APPEND);
+ try {
+ if (!self::rmdirr($file)) {
+ file_put_contents($leftoversFile, $file . "\n", FILE_APPEND);
+ }
+ } catch (UnexpectedValueException $ex) {
+ // not really much we can do here anymore
+ if (!is_null(\OC::$server)) {
+ $message = $ex->getMessage();
+ \OC::$server->getLogger()->error("Error deleting file/folder: $file - Reason: $message",
+ array('app' => 'core'));
+ }
}
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list