move atexit code to xexit() and fix ftrunc order for mtime.
[tfcrypt.git] / tfcrypt.c
index 6ac7bdceb4da6879c98df6f6483e4cf4d3026559..15f23e2ea3159a71410c03b43c8abd85ad6cf1fa 100644 (file)
--- a/tfcrypt.c
+++ b/tfcrypt.c
@@ -1374,14 +1374,6 @@ _macwagain:              lio = xwrite(dfd, pblk, lrem);
 
        if (verbose || status_timer || do_stop == YES) print_crypt_status(0);
 
-       if (do_preserve_time) fcopy_matime(dfd, &s_stat);
-       xclose(sfd);
-       if (do_ftrunc > TFC_NO_FTRUNC) {
-               if (do_ftrunc == TFC_FTRUNC_TAIL) ftrunc_dfd = total_processed_dst;
-               if (ftruncate(dfd, (off_t)ftrunc_dfd) == -1) xerror(YES, NO, YES, "ftruncate(%d)", dfd);
-       }
-       xclose(dfd);
-
        xexit(exitcode);
        return -1;
 }