ret = file_writable(dest_wimfile);
if (ret != 0)
- return ret;
+ goto out;
dest_ctype = wimlib_get_compression_type(dest_w);
if (compression_type_specified
imagex_error("Exiting with error code %d:\n"
" %s.", ret,
wimlib_get_error_string(ret));
- if (ret == WIMLIB_ERR_NTFS_3G)
+ if (ret == WIMLIB_ERR_NTFS_3G && errno != 0)
imagex_error_with_errno("errno");
}
return ret;