]> wimlib.net Git - wimlib/commitdiff
wimboot.c: Set correct error code if rename fails
authorEric Biggers <ebiggers3@gmail.com>
Fri, 4 Jul 2014 01:57:00 +0000 (20:57 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 4 Jul 2014 01:57:00 +0000 (20:57 -0500)
src/wimboot.c

index 86081dfc329d44fcf1d40309d1c1e3f88ed4e0bc..35fe13a97e6fc12ff052b93d23fc4b73cb017659 100644 (file)
@@ -807,6 +807,7 @@ update_wimoverlay_manually(const wchar_t *drive, const wchar_t *wim_path,
                if (ret) {
                        ERROR_WITH_ERRNO("Can't rename \"%ls\" => \"%ls\"",
                                         path_main, path_wimlib_backup);
                if (ret) {
                        ERROR_WITH_ERRNO("Can't rename \"%ls\" => \"%ls\"",
                                         path_main, path_wimlib_backup);
+                       ret = WIMLIB_ERR_RENAME;
                        goto out_free_new_contents;
                }
        }
                        goto out_free_new_contents;
                }
        }
@@ -816,6 +817,7 @@ update_wimoverlay_manually(const wchar_t *drive, const wchar_t *wim_path,
        if (ret) {
                ERROR_WITH_ERRNO("Can't rename \"%ls\" => \"%ls\"",
                                 path_new, path_main);
        if (ret) {
                ERROR_WITH_ERRNO("Can't rename \"%ls\" => \"%ls\"",
                                 path_new, path_main);
+               ret = WIMLIB_ERR_RENAME;
        }
 out_free_new_contents:
        FREE(new_contents);
        }
 out_free_new_contents:
        FREE(new_contents);