Fix some warnings and typos to fix the windows build.
[mono.git] / eglib / src / gfile-win32.c
index 2b139795cb465a3d9493db7e36a2eaa1d5652079..40c13bb7858f047bb2a567a7f91d44170f243723 100644 (file)
@@ -77,10 +77,10 @@ g_file_test (const gchar *filename, GFileTest test)
                return FALSE;
 
        utf16_filename = u8to16 (filename);
-       attr = GetFileAttributesW (filename);
+       attr = GetFileAttributesW (utf16_filename);
        g_free (utf16_filename);
        
-       if (ret == INVALID_FILE_ATTRIBUTES)
+       if (attr == INVALID_FILE_ATTRIBUTES)
                return FALSE;
 
        if ((test & G_FILE_TEST_EXISTS) != 0) {
@@ -88,8 +88,8 @@ g_file_test (const gchar *filename, GFileTest test)
        }
 
        if ((test & G_FILE_TEST_IS_EXECUTABLE) != 0) {
-               int len = strlen (filename);
-               if (len > 4 && strcmp (filename + len-3, "exe")
+               size_t len = strlen (filename);
+               if (len > 4 && strcmp (filename + len-3, "exe"))
                    return TRUE;
                    
                return FALSE;