]> wimlib.net Git - wimlib/blobdiff - src/wim.c
join_wims(): Don't rebuild metadata resources
[wimlib] / src / wim.c
index 67b840cea209dcf68b0281164e2ff77fc75766a1..9a20cc5756969e2642cc0ba7e01fd6b91756541f 100644 (file)
--- a/src/wim.c
+++ b/src/wim.c
@@ -255,7 +255,7 @@ WIMLIBAPI int
 wimlib_resolve_image(WIMStruct *w, const tchar *image_name_or_num)
 {
        tchar *p;
-       int image;
+       long image;
        int i;
 
        if (!image_name_or_num || !*image_name_or_num)
@@ -271,8 +271,8 @@ wimlib_resolve_image(WIMStruct *w, const tchar *image_name_or_num)
                return image;
        } else {
                for (i = 1; i <= w->hdr.image_count; i++) {
-                       if (tstrcmp(image_name_or_num,
-                                   wimlib_get_image_name(w, i)) == 0)
+                       if (!tstrcmp(image_name_or_num,
+                                    wimlib_get_image_name(w, i)))
                                return i;
                }
                return WIMLIB_NO_IMAGE;
@@ -596,12 +596,16 @@ wimlib_free(WIMStruct *w)
 static bool
 test_locale_ctype_utf8()
 {
+#ifdef __WIN32__
+       return false;
+#else
        char *ctype = nl_langinfo(CODESET);
 
        return (!strstr(ctype, "UTF-8") ||
                !strstr(ctype, "UTF8") ||
                !strstr(ctype, "utf8") ||
                !strstr(ctype, "utf-8"));
+#endif
 }
 
 /* Get global memory allocations out of the way,