##// END OF EJS Templates
rust-revlog: don't try to open the data file if the index is empty...
Raphaël Gomès -
r52759:09ece563 default
parent child Browse files
Show More
@@ -712,6 +712,9 impl Revlog {
712 let data_bytes: Option<Box<dyn Deref<Target = [u8]> + Send>> =
712 let data_bytes: Option<Box<dyn Deref<Target = [u8]> + Send>> =
713 if index.is_inline() {
713 if index.is_inline() {
714 None
714 None
715 } else if index.is_empty() {
716 // No need to even try to open the data file then.
717 Some(Box::new(&[][..]))
715 } else {
718 } else {
716 let data_path = data_path.unwrap_or(&default_data_path);
719 let data_path = data_path.unwrap_or(&default_data_path);
717 let data_mmap = store_vfs.mmap_open(data_path)?;
720 let data_mmap = store_vfs.mmap_open(data_path)?;
General Comments 0
You need to be logged in to leave comments. Login now