Added support for option '-L' (always dereference symbolic links).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25279 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
63368af591
commit
2988eab3dc
@ -45,6 +45,7 @@ struct Options {
|
||||
attributesOnly(false),
|
||||
ignoreAttributes(false),
|
||||
dereference(true),
|
||||
alwaysDereference(false),
|
||||
force(false),
|
||||
recursive(false)
|
||||
{
|
||||
@ -54,6 +55,7 @@ struct Options {
|
||||
bool attributesOnly;
|
||||
bool ignoreAttributes;
|
||||
bool dereference;
|
||||
bool alwaysDereference;
|
||||
bool force;
|
||||
bool recursive;
|
||||
};
|
||||
@ -966,7 +968,7 @@ copy_dir_contents(FSDomain *sourceDomain, const char *source,
|
||||
PathDeleter targetDeleter(targetEntry);
|
||||
|
||||
fssh_status_t error = copy_entry(sourceDomain, sourceEntry,
|
||||
targetDomain, targetEntry, options, false);
|
||||
targetDomain, targetEntry, options, options.alwaysDereference);
|
||||
if (error != FSSH_B_OK)
|
||||
return error;
|
||||
}
|
||||
@ -1260,6 +1262,10 @@ command_cp(int argc, const char* const* argv)
|
||||
case 'f':
|
||||
options.force = true;
|
||||
break;
|
||||
case 'L':
|
||||
options.dereference = true;
|
||||
options.alwaysDereference = true;
|
||||
break;
|
||||
case 'r':
|
||||
options.recursive = true;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user