aboutsummaryrefslogtreecommitdiffstats
path: root/src/db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/db.rs')
-rw-r--r--src/db.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/db.rs b/src/db.rs
index 2187010..70204a2 100644
--- a/src/db.rs
+++ b/src/db.rs
@@ -122,8 +122,9 @@ fn read_block_name(config_name: &str) -> io::Result<Vec<PathBuf>> {
122} 122}
123 123
124fn parse_block(path: &str) -> u64 { 124fn parse_block(path: &str) -> u64 {
125 let start_pos = path.rfind("/").unwrap() + 1;
125 let end_pos = path.find(".block").unwrap(); 126 let end_pos = path.find(".block").unwrap();
126 let block_str = path[9..end_pos].to_string(); 127 let block_str = path[start_pos..end_pos].to_string();
127 let block_u64: u64 = block_str.parse().unwrap(); 128 let block_u64: u64 = block_str.parse().unwrap();
128 block_u64 129 block_u64
129} 130}