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:
@@ -45,6 +45,7 @@ struct Options {
|
|||||||
attributesOnly(false),
|
attributesOnly(false),
|
||||||
ignoreAttributes(false),
|
ignoreAttributes(false),
|
||||||
dereference(true),
|
dereference(true),
|
||||||
|
alwaysDereference(false),
|
||||||
force(false),
|
force(false),
|
||||||
recursive(false)
|
recursive(false)
|
||||||
{
|
{
|
||||||
@@ -54,6 +55,7 @@ struct Options {
|
|||||||
bool attributesOnly;
|
bool attributesOnly;
|
||||||
bool ignoreAttributes;
|
bool ignoreAttributes;
|
||||||
bool dereference;
|
bool dereference;
|
||||||
|
bool alwaysDereference;
|
||||||
bool force;
|
bool force;
|
||||||
bool recursive;
|
bool recursive;
|
||||||
};
|
};
|
||||||
@@ -966,7 +968,7 @@ copy_dir_contents(FSDomain *sourceDomain, const char *source,
|
|||||||
PathDeleter targetDeleter(targetEntry);
|
PathDeleter targetDeleter(targetEntry);
|
||||||
|
|
||||||
fssh_status_t error = copy_entry(sourceDomain, sourceEntry,
|
fssh_status_t error = copy_entry(sourceDomain, sourceEntry,
|
||||||
targetDomain, targetEntry, options, false);
|
targetDomain, targetEntry, options, options.alwaysDereference);
|
||||||
if (error != FSSH_B_OK)
|
if (error != FSSH_B_OK)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
@@ -1260,6 +1262,10 @@ command_cp(int argc, const char* const* argv)
|
|||||||
case 'f':
|
case 'f':
|
||||||
options.force = true;
|
options.force = true;
|
||||||
break;
|
break;
|
||||||
|
case 'L':
|
||||||
|
options.dereference = true;
|
||||||
|
options.alwaysDereference = true;
|
||||||
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
options.recursive = true;
|
options.recursive = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user