Merge pull request #469 from symform/symform-better-drive-type-check
authorMiguel de Icaza <miguel@gnome.org>
Sat, 9 Feb 2013 22:26:16 +0000 (14:26 -0800)
committerMiguel de Icaza <miguel@gnome.org>
Fri, 8 Mar 2013 22:09:36 +0000 (17:09 -0500)
When detecting drive type it is possible that a path might be mounted mo...

mono/io-layer/io.c

index ac8cb74a10d19710eec2500eccc183d7f5e4d309..3e61f0cfbbd9eada6d0323ce76ecb52cb7e3f411 100755 (executable)
@@ -4126,8 +4126,12 @@ GetDriveTypeFromPath (const gchar *utf8_root_path_name)
                if (strcmp (*(splitted + 1), utf8_root_path_name) == 0 ||
                    (strcmp (*(splitted + 1), "/") == 0 && strlen (utf8_root_path_name) == 0)) {
                        drive_type = _wapi_get_drive_type (*(splitted + 2));
-                       g_strfreev (splitted);
-                       break;
+                       /* it is possible this path might be mounted again with
+                          a known type...keep looking */
+                       if (drive_type != DRIVE_UNKNOWN) {
+                               g_strfreev (splitted);
+                               break;
+                       }
                }
 
                g_strfreev (splitted);