mirror of
https://github.com/sheumann/hush.git
synced 2024-12-27 01:32:08 +00:00
Patch from Matt Kraai: "When it encounters a problem creating a link, ln
shouldn't give up entirely but instead continue processing the rest of its arguments. The attached patch does this."
This commit is contained in:
parent
aa3908d1b7
commit
13241dfbdd
@ -81,6 +81,7 @@ static int fs_link(const char *link_DestName, const char *link_SrcName, const in
|
||||
|
||||
extern int ln_main(int argc, char **argv)
|
||||
{
|
||||
int status = EXIT_SUCCESS;
|
||||
int flag = 0;
|
||||
int opt;
|
||||
|
||||
@ -102,10 +103,10 @@ extern int ln_main(int argc, char **argv)
|
||||
}
|
||||
while(optind<(argc-1)) {
|
||||
if (fs_link(argv[optind], argv[argc-1], flag)==FALSE)
|
||||
return(FALSE);
|
||||
status = EXIT_FAILURE;
|
||||
optind++;
|
||||
}
|
||||
return(TRUE);
|
||||
return(status);
|
||||
}
|
||||
|
||||
/*
|
||||
|
5
ln.c
5
ln.c
@ -81,6 +81,7 @@ static int fs_link(const char *link_DestName, const char *link_SrcName, const in
|
||||
|
||||
extern int ln_main(int argc, char **argv)
|
||||
{
|
||||
int status = EXIT_SUCCESS;
|
||||
int flag = 0;
|
||||
int opt;
|
||||
|
||||
@ -102,10 +103,10 @@ extern int ln_main(int argc, char **argv)
|
||||
}
|
||||
while(optind<(argc-1)) {
|
||||
if (fs_link(argv[optind], argv[argc-1], flag)==FALSE)
|
||||
return(FALSE);
|
||||
status = EXIT_FAILURE;
|
||||
optind++;
|
||||
}
|
||||
return(TRUE);
|
||||
return(status);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user