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");
|
||||
ret = false;
|
||||
}
|
||||
if (nwrite == 0)
|
||||
if (nwrite <= 0)
|
||||
break;
|
||||
written += nwrite;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue