@@ -8,8 +8,8 @@ use crate::{
88 append:: { open_archive_then_seek_to_end, run_append_archive} ,
99 ask_password, check_password,
1010 core:: {
11- AclStrategy , CollectOptions , CreateOptions , KeepOptions , OwnerOptions , PathFilter ,
12- PathTransformers , PathnameEditor , PermissionStrategy , TimeFilterResolver ,
11+ AclStrategy , CollectOptions , CreateOptions , FflagsStrategy , KeepOptions , OwnerOptions ,
12+ PathFilter , PathTransformers , PathnameEditor , PermissionStrategy , TimeFilterResolver ,
1313 TimestampStrategyResolver , TransformStrategyUnSolid , XattrStrategy , apply_chroot,
1414 collect_items_from_paths, collect_split_archives, entry_option,
1515 path_lock:: PathLocks ,
@@ -60,6 +60,7 @@ use std::{env, io, path::PathBuf, sync::Arc, time::SystemTime};
6060 group( ArgGroup :: new( "ctime-newer-than-source" ) . args( [ "newer_ctime" , "newer_ctime_than" ] ) ) ,
6161 group( ArgGroup :: new( "mtime-older-than-source" ) . args( [ "older_mtime" , "older_mtime_than" ] ) ) ,
6262 group( ArgGroup :: new( "mtime-newer-than-source" ) . args( [ "newer_mtime" , "newer_mtime_than" ] ) ) ,
63+ group( ArgGroup :: new( "keep-fflags-flag" ) . args( [ "keep_fflags" , "no_keep_fflags" ] ) ) ,
6364) ]
6465#[ cfg_attr( windows, command(
6566 group( ArgGroup :: new( "windows-unstable-keep-permission" ) . args( [ "keep_permission" , "no_keep_permission" ] ) . requires( "unstable" ) ) ,
@@ -187,6 +188,20 @@ pub(crate) struct StdioCommand {
187188 help = "Do not archive ACLs. This is the inverse option of --keep-acl (unstable)"
188189 ) ]
189190 no_keep_acl : bool ,
191+ #[ arg(
192+ long,
193+ visible_aliases = [ "preserve-fflags" , "fflags" ] ,
194+ requires = "unstable" ,
195+ help = "Archiving the file flags of the files (unstable)"
196+ ) ]
197+ keep_fflags : bool ,
198+ #[ arg(
199+ long,
200+ visible_aliases = [ "no-preserve-fflags" , "no-fflags" ] ,
201+ requires = "unstable" ,
202+ help = "Do not archive file flags of files. This is the inverse option of --keep-fflags (unstable)"
203+ ) ]
204+ no_keep_fflags : bool ,
190205 #[ arg(
191206 long,
192207 help = "Compress multiple files together for better compression ratio"
@@ -638,6 +653,7 @@ fn run_create_archive(args: StdioCommand) -> anyhow::Result<()> {
638653 ) ,
639654 xattr_strategy : XattrStrategy :: from_flags ( args. keep_xattr , args. no_keep_xattr ) ,
640655 acl_strategy : AclStrategy :: from_flags ( args. keep_acl , args. no_keep_acl ) ,
656+ fflags_strategy : FflagsStrategy :: from_flags ( args. keep_fflags , args. no_keep_fflags ) ,
641657 } ;
642658 let owner_options = resolve_owner_options (
643659 args. owner ,
@@ -731,6 +747,7 @@ fn run_extract_archive(args: StdioCommand) -> anyhow::Result<()> {
731747 ) ,
732748 xattr_strategy : XattrStrategy :: from_flags ( args. keep_xattr , args. no_keep_xattr ) ,
733749 acl_strategy : AclStrategy :: from_flags ( args. keep_acl , args. no_keep_acl ) ,
750+ fflags_strategy : FflagsStrategy :: from_flags ( args. keep_fflags , args. no_keep_fflags ) ,
734751 } ,
735752 owner_options : resolve_owner_options (
736753 args. owner ,
@@ -889,6 +906,7 @@ fn run_append(args: StdioCommand) -> anyhow::Result<()> {
889906 ) ,
890907 xattr_strategy : XattrStrategy :: from_flags ( args. keep_xattr , args. no_keep_xattr ) ,
891908 acl_strategy : AclStrategy :: from_flags ( args. keep_acl , args. no_keep_acl ) ,
909+ fflags_strategy : FflagsStrategy :: from_flags ( args. keep_fflags , args. no_keep_fflags ) ,
892910 } ;
893911 let owner_options = resolve_owner_options (
894912 args. owner ,
@@ -1025,6 +1043,7 @@ fn run_update(args: StdioCommand) -> anyhow::Result<()> {
10251043 ) ,
10261044 xattr_strategy : XattrStrategy :: from_flags ( args. keep_xattr , args. no_keep_xattr ) ,
10271045 acl_strategy : AclStrategy :: from_flags ( args. keep_acl , args. no_keep_acl ) ,
1046+ fflags_strategy : FflagsStrategy :: Never ,
10281047 } ;
10291048 let owner_options = OwnerOptions :: new (
10301049 args. uname ,
0 commit comments