X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fmount_image.c;h=a05a822d10d78d0f2dc92b94076acdba5d7a36b4;hp=28a807d7afdfd7d26537a57a97d99e5203564841;hb=1a2837de2180cc871239a0627903a142a754e189;hpb=54ab9fc02a6deab44102a7f18b85c6ff7cf7774b diff --git a/src/mount_image.c b/src/mount_image.c index 28a807d7..a05a822d 100644 --- a/src/mount_image.c +++ b/src/mount_image.c @@ -2499,6 +2499,12 @@ WIMLIBAPI int wimlib_mount_image(WIMStruct *wim, int image, const char *dir, if (ret) ret = WIMLIB_ERR_FUSE; + + /* Try to delete the staging directory if a deletion wasn't yet + * attempted due to an earlier error */ + if (ctx.staging_dir_name) + delete_staging_dir(&ctx); + out_free_dir_copy: FREE(dir_copy); out_unlock: