Mail Archives: djgpp-workers/1996/06/28/10:56:48
Hi Workers!
I've found a bug in stubify.c. This caused lost clusters when the
disk became full (fortunately I noticed it on a ramdisk).
The problem is, that it tries to delete the output file before closing it.
(As the Interrupt List 50 says this is not a problem with dr-dos, or when
share.exe is loaded.)
Bye, ML
So here is the diff:
-------------------cut----------------cut--------------cut---------------
*** stubify.co Sun Nov 5 22:32:32 1995
--- stubify.c Fri Jun 28 01:17:10 1996
***************
*** 155,161 ****
{
perror(ofname);
- unlink(ofilename);
close(ifile);
close(ofile);
exit(1);
}
--- 155,161 ----
{
perror(ofname);
close(ifile);
close(ofile);
+ unlink(ofilename);
exit(1);
}
***************
*** 163,169 ****
{
fprintf(stderr, "%s: disk full\n", ofname);
- unlink(ofilename);
close(ifile);
close(ofile);
exit(1);
}
--- 163,169 ----
{
fprintf(stderr, "%s: disk full\n", ofname);
close(ifile);
close(ofile);
+ unlink(ofilename);
exit(1);
}
- Raw text -