File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 6363use OCP \Files \NotFoundException ;
6464use OCP \Files \Search \ISearchBinaryOperator ;
6565use OCP \Files \Search \ISearchComparison ;
66+ use OCP \Files \StorageInvalidException ;
6667use OCP \Files \StorageNotAvailableException ;
6768use OCP \IURLGenerator ;
6869use OCP \IUser ;
@@ -603,6 +604,10 @@ public static function expireOlderThanMaxForUser($uid) {
603604 } catch (NotFoundException $ e ) {
604605 // Original node not found, delete the version
605606 return true ;
607+ } catch (StorageNotAvailableException | StorageInvalidException $ e ) {
608+ // Storage can't be used, but it might only be temporary so we can't always delete the version
609+ // since we can't determine if the version is named we take the safe route and don't expire
610+ return false ;
606611 } catch (DoesNotExistException $ ex ) {
607612 // Version on FS can have no equivalent in the DB if they were created before the version naming feature.
608613 // So we ignore DoesNotExistException.
You can’t perform that action at this time.
0 commit comments