only delete if there were no io errors

This commit is contained in:
Daniel Steinberg 2014-04-01 10:42:12 -07:00
parent 6568858e81
commit 94b169b8dc

@ -998,7 +998,8 @@ int mv(char* src, char* dest) {
fclose(fsrc);
fclose(fdest);
remove(src);
if (!ferror(fdest) && !ferror(fsrc))
remove(src);
return 0;
}