forked from Bananymous/banan-os
cp: abort copy if write fails
This commit is contained in:
parent
7a54a088b4
commit
9e4adc1264
|
@ -69,7 +69,7 @@ bool copy_file(const BAN::String& source, BAN::String destination)
|
||||||
perror("write");
|
perror("write");
|
||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
if (nwrite == 0)
|
if (nwrite <= 0)
|
||||||
break;
|
break;
|
||||||
written += nwrite;
|
written += nwrite;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue