From fa2dcb9d35aed13af6c0c90fe794465ed4f02eeb Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Tue, 24 Sep 2024 16:42:56 +0100 Subject: [PATCH] Don't remove target in mcopy --- mcopy.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/mcopy.c b/mcopy.c index ef21690..0c92b04 100644 --- a/mcopy.c +++ b/mcopy.c @@ -1832,8 +1832,6 @@ int copy_from_image (const char *target, struct file_info *fi, const char *fname if (seekto (sector * 512) || fread (fi->scratch, 512, 1, ofp) != 1) { fclose (tfp); - remove (target); - return -1; } @@ -1843,8 +1841,6 @@ int copy_from_image (const char *target, struct file_info *fi, const char *fname if (fwrite (fi->scratch, 512, 1, tfp) != 1) { fclose (tfp); - remove (target); - return -1; } @@ -1865,8 +1861,6 @@ int copy_from_image (const char *target, struct file_info *fi, const char *fname if (fwrite (fi->scratch, fi->bytes, 1, tfp) != 1) { fclose (tfp); - remove (target); - return -1; } @@ -2209,8 +2203,6 @@ int main (int argc, char **argv) { if (memcmp (source, "::", 2)) { fclose (ofp); - remove (state->outfile); - print_help (EXIT_FAILURE); } -- 2.34.1