File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -592,14 +592,17 @@ public static function expireOlderThanMaxForUser($uid) {
592592 throw new DoesNotExistException ('Could not find relative path of ( ' . $ info ->getPath () . ') ' );
593593 }
594594
595- $ node = $ userFolder ->get (substr ($ path , 0 , -strlen ('.v ' .$ version )));
596595 try {
596+ $ node = $ userFolder ->get (substr ($ path , 0 , -strlen ('.v ' .$ version )));
597597 $ versionEntity = $ versionsMapper ->findVersionForFileId ($ node ->getId (), $ version );
598598 $ versionEntities [$ info ->getId ()] = $ versionEntity ;
599599
600600 if ($ versionEntity ->getLabel () !== '' ) {
601601 return false ;
602602 }
603+ } catch (NotFoundException $ e ) {
604+ // Original node not found, delete the version
605+ return true ;
603606 } catch (DoesNotExistException $ ex ) {
604607 // Version on FS can have no equivalent in the DB if they were created before the version naming feature.
605608 // So we ignore DoesNotExistException.
You can’t perform that action at this time.
0 commit comments