[MSVC 2015] file_exists() fails on MSVC2105 as file_stat.st_ino gets reset
authorAndersBroman <anders.broman@ericsson.com>
Tue, 23 Jun 2015 20:03:20 +0000 (22:03 +0200)
committerAnders Broman <a.broman58@gmail.com>
Tue, 23 Jun 2015 20:12:39 +0000 (20:12 +0000)
to zero in the function call if the file does not exist. The general code
seems to work with MSVC2015 so use that.

Change-Id: Ic5360089f96be620fbe99ba4e819e0caa5ca0215
Reviewed-on: https://code.wireshark.org/review/9070
Reviewed-by: Anders Broman <a.broman58@gmail.com>
wsutil/filesystem.c

index 3cfc1b87eec7661334e7add1e4c355801d9048c5..bfdcef4fe045f7b8a18a9a12b203855977e42d7f 100644 (file)
@@ -1960,7 +1960,8 @@ file_exists(const char *fname)
         return FALSE;
     }
 
-#ifdef _WIN32
+#if _MSC_VER < 1900
+
     /*
      * This is a bit tricky on win32. The st_ino field is documented as:
      * "The inode, and therefore st_ino, has no meaning in the FAT, ..."