push modification

This commit is contained in:
grimhilt
2023-08-24 20:59:41 +02:00
parent f64d719b31
commit 498fada9ec
8 changed files with 254 additions and 30 deletions

View File

@@ -222,6 +222,7 @@ fn create_obj(name: String, content: &str) -> io::Result<()> {
Ok(())
}
// get the last time a blob synced with remote
pub fn get_timestamp(path_s: String) -> Option<i64> {
let mut obj_p = path::objects();
@@ -235,7 +236,7 @@ pub fn get_timestamp(path_s: String) -> Option<i64> {
Some(Ok(line)) => {
let mut data = line.rsplit(' ');
if data.clone().count() >= 2 {
Some(data.next().unwrap().parse::<i64>().unwrap())
Some(data.nth_back(1).unwrap().parse::<i64>().unwrap())
} else {
None
}