Skip to content
Snippets Groups Projects
Commit 7bed5299 authored by Vincent Petry's avatar Vincent Petry
Browse files

Don't resize trash when no user

Happens when overwriting files on federated shares.
parent 6c0e9211
No related branches found
No related tags found
No related merge requests found
......@@ -40,10 +40,13 @@ class Hooks {
if( \OCP\App::isEnabled('files_trashbin') ) {
$uid = $params['uid'];
Trashbin::deleteUser($uid);
}
}
}
public static function post_write_hook($params) {
Trashbin::resizeTrash(\OCP\User::getUser());
$user = \OCP\User::getUser();
if (!empty($user)) {
Trashbin::resizeTrash($user);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment