flush.patch 633 B

12345678910111213141516
  1. diff -Nur secure_delete-3.1-old//srm.c secure_delete-3.1/srm.c
  2. --- secure_delete-3.1-old//srm.c 2011-06-16 14:36:13.119001280 +0300
  3. +++ secure_delete-3.1/srm.c 2011-06-16 14:36:22.264001036 +0300
  4. @@ -166,8 +166,10 @@
  5. return 3;
  6. }
  7. - if (sdel_overwrite(mode, fd, 0, bufsize, filestat.st_size > 0 ? filestat.st_size : 1, zero) == 0)
  8. + if (sdel_overwrite(mode, fd, 0, bufsize, filestat.st_size > 0 ? filestat.st_size : 1, zero) == 0) {
  9. + close(fd);
  10. return sdel_unlink(filename, 0, 1, slow);
  11. + }
  12. } /* end IS_REG() */
  13. else {
  14. if (S_ISDIR(filestat.st_mode)) {