Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A0-3514: Don't log old backups not existing #1499

Merged
merged 3 commits into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions finality-aleph/src/party/backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ pub fn rotate(
/// This should be done at the beginning of the new session.
pub fn remove_old_backups(path: Option<PathBuf>, current_session: u32) -> io::Result<()> {
if let Some(path) = path {
if !path.exists() {
return Ok(());
}
for read_dir in fs::read_dir(path)? {
lesniak43 marked this conversation as resolved.
Show resolved Hide resolved
let item = read_dir?;
match item.file_name().to_str() {
Expand Down
Loading