Fixed cp
This commit is contained in:
parent
71b98e52d8
commit
689899cbec
@ -23,7 +23,7 @@ char *make_path(const char *src, const char *dst) {
|
||||
|
||||
int write_buffer(int ifd, int ofd) {
|
||||
off_t len = lseek(ifd, 0, SEEK_END);
|
||||
if (len <= 0)
|
||||
if (len < 0)
|
||||
return 1;
|
||||
|
||||
if (ftruncate(ofd, len) < 0)
|
||||
@ -143,7 +143,7 @@ int main(const int argc, const char **argv) {
|
||||
if (new_path == NULL)
|
||||
return 1;
|
||||
|
||||
if (copy(argv[i], new_path))
|
||||
if (cptree(argv[i], new_path))
|
||||
ret = 1;
|
||||
|
||||
free(new_path);
|
||||
|
Loading…
Reference in New Issue
Block a user