diff --git a/src/cli/args.rs b/src/cli/args.rs index 11ee48d..7801b5b 100644 --- a/src/cli/args.rs +++ b/src/cli/args.rs @@ -239,7 +239,7 @@ pub fn parse() -> Arguments { (about: "creates a new backup") (@arg full: --full "create a full backup") (@arg reference: --ref +takes_value "the reference backup to use for partial backup") - (@arg same_device: --xdev -x "do not cross filesystem boundaries") + (@arg cross_device: --xdev -x "allow to cross filesystem boundaries") (@arg exclude: --exclude -e ... +takes_value "exclude this path or file") (@arg excludes_from: --excludesfrom +takes_value "read the list of exludes from this file") (@arg no_default_excludes: --nodefaultexcludes "do not load the default excludes file") @@ -361,7 +361,7 @@ pub fn parse() -> Arguments { repo_path: repository.to_string(), backup_name: backup.unwrap().to_string(), full: args.is_present("full"), - same_device: args.is_present("same_device"), + same_device: !args.is_present("cross_device"), excludes: args.values_of("exclude").map(|v| v.map(|k| k.to_string()).collect()).unwrap_or_else(|| vec![]), excludes_from: args.value_of("excludes_from").map(|v| v.to_string()), src_path: args.value_of("SRC").unwrap().to_string(), diff --git a/src/repository/metadata.rs b/src/repository/metadata.rs index 5b1e69c..6b45511 100644 --- a/src/repository/metadata.rs +++ b/src/repository/metadata.rs @@ -177,9 +177,7 @@ impl Inode { inode.mode = meta.st_mode(); inode.user = meta.st_uid(); inode.group = meta.st_gid(); - inode.access_time = meta.st_atime(); inode.modify_time = meta.st_mtime(); - inode.create_time = meta.st_ctime(); Ok(inode) } @@ -208,7 +206,7 @@ impl Inode { ).map_err(|e| InodeError::SetPermissions(e, full_path.clone(), self.mode))); try!(filetime::set_file_times( &full_path, - FileTime::from_seconds_since_1970(self.access_time as u64, 0), + FileTime::from_seconds_since_1970(self.modify_time as u64, 0), FileTime::from_seconds_since_1970(self.modify_time as u64, 0) ).map_err(|e| InodeError::SetTimes(e, full_path.clone()))); try!(chown(&full_path, self.user, self.group).map_err(|e| InodeError::SetOwnership(e, full_path.clone())));