This commit is contained in:
Your Name 2023-10-17 20:32:07 +03:00
parent 71b98e52d8
commit 689899cbec

View File

@ -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);