Fix the optional file to send over transport handling.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39227 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -56,7 +56,7 @@ int main (int argc, char *argv[])
|
|||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
if (argc != 1) {
|
if (argc < 1) {
|
||||||
usage(argc, argv);
|
usage(argc, argv);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -149,8 +149,8 @@ int main (int argc, char *argv[])
|
|||||||
printf("failed!\n");
|
printf("failed!\n");
|
||||||
|
|
||||||
|
|
||||||
if (argc > 2) {
|
if (argc > 1) {
|
||||||
BFile data(argv[2], B_READ_ONLY);
|
BFile data(argv[1], B_READ_ONLY);
|
||||||
if (data.InitCheck() == B_OK) {
|
if (data.InitCheck() == B_OK) {
|
||||||
uint8 buffer[B_PAGE_SIZE];
|
uint8 buffer[B_PAGE_SIZE];
|
||||||
ssize_t total = 0;
|
ssize_t total = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user