check timestamp for conflicts with remote

This commit is contained in:
grimhilt
2023-06-24 16:52:02 +02:00
parent 2c593fb254
commit 675b650200
5 changed files with 22 additions and 15 deletions

View File

@@ -110,7 +110,7 @@ fn create_obj(name: String, content: &str) -> io::Result<()> {
Ok(())
}
pub fn get_timestamp(path_s: String) -> Option<String> {
pub fn get_timestamp(path_s: String) -> Option<i64> {
let mut obj_p = match path::objects() {
Some(path) => path,
None => todo!(),
@@ -126,7 +126,7 @@ pub fn get_timestamp(path_s: String) -> Option<String> {
Some(Ok(line)) => {
let mut data = line.rsplit(' ');
if data.clone().count() >= 2 {
Some(String::from(data.next().unwrap()))
Some(data.next().unwrap().parse::<i64>().unwrap())
} else {
None
}