| | |
| | | continue; |
| | | } |
| | | int dashPos = name.indexOf('-', 7); |
| | | if (dashPos < 0) |
| | | { |
| | | |
| | | try |
| | | { |
| | | if (dashPos < 0) |
| | | { |
| | | ByteString ts = ByteString.valueOfUtf8(name.substring(7, dotPos)); |
| | | long timestamp = GeneralizedTimeSyntax.decodeGeneralizedTimeValue(ts); |
| | | if (timestamp > latestTimestamp) |
| | |
| | | latestCounter = 0; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | // Ignore. |
| | | } |
| | | } |
| | | else |
| | | { |
| | | try |
| | | { |
| | | ByteString ts = ByteString.valueOfUtf8(name.substring(7, dashPos)); |
| | | long timestamp = GeneralizedTimeSyntax.decodeGeneralizedTimeValue(ts); |
| | | int counter = Integer.parseInt(name.substring(dashPos + 1, dotPos)); |
| | |
| | | latestCounter = counter; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | } |
| | | catch (Exception ignored) |
| | | { |
| | | // Ignore. |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (latestFileName == null) |
| | | { |