Skip to content

Commit

Permalink
fix logging: only walk remote dir if it exist (#23663)
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoranYi authored Mar 15, 2022
1 parent 64e2d9d commit 8c4f010
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions runtime/src/snapshot_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1166,9 +1166,10 @@ where
};

let mut ret = walk_dir(snapshot_archives_dir);
ret.append(&mut walk_dir(
build_snapshot_archives_remote_dir(snapshot_archives_dir).as_ref(),
));
let remote_dir = build_snapshot_archives_remote_dir(snapshot_archives_dir);
if remote_dir.exists() {
ret.append(&mut walk_dir(remote_dir.as_ref()));
}
ret
}

Expand Down

0 comments on commit 8c4f010

Please sign in to comment.