diff --git a/src/tools/fs_shell/command_cp.cpp b/src/tools/fs_shell/command_cp.cpp index f09bb2d1da..9b6145a98c 100644 --- a/src/tools/fs_shell/command_cp.cpp +++ b/src/tools/fs_shell/command_cp.cpp @@ -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;