- if (cmd == CMD_APPEND)
- ret = wimlib_open_wim(wimfile, open_flags, &wim,
- imagex_progress_func);
- else
+ if (cmd == CMD_APPEND) {
+ ret = wimlib_open_wim_with_progress(wimfile, open_flags, &wim,
+ imagex_progress_func, NULL);
+ if (ret)
+ goto out_free_capture_sources;
+ } else {