Got rid of the argument number limit of fs_shell's cp command.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16000 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c592b98fd2
commit
d4e25ae745
@ -1125,15 +1125,15 @@ copy_entry(FSDomain *sourceDomain, const char *source,
|
||||
int
|
||||
do_xcp(int argc, char **argv)
|
||||
{
|
||||
enum { MAX_SOURCE_FILES = 128 };
|
||||
const char *sources[MAX_SOURCE_FILES];
|
||||
int sourceCount = 0;
|
||||
Options options;
|
||||
|
||||
if (argc > MAX_SOURCE_FILES) {
|
||||
fprintf(stderr, "Too many args!\n");
|
||||
const char **sources = new const char*[argc];
|
||||
if (!sources) {
|
||||
fprintf(stderr, "No memory!\n");
|
||||
return FS_EINVAL;
|
||||
}
|
||||
ArrayDeleter<const char*> _(sources);
|
||||
|
||||
// parse parameters
|
||||
for (int argi = 1; argi < argc; argi++) {
|
||||
|
Loading…
Reference in New Issue
Block a user