summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 0c71f1263bf..599225bbdde 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -8050,7 +8050,12 @@ w32_io_info(VALUE *file, w32_io_info_t *st)
st->file_id_p = TRUE;
return ret;
}
- /* may not work at files on network drives, fallback to old API. */
+ else if (GetLastError() != ERROR_INVALID_PARAMETER) {
+ CloseHandle(f);
+ return FALSE;
+ }
+ /* this API may not wrok at files on non Microsoft SMB
+ * server, fallback to old API then. */
}
if (GetFileInformationByHandle(f, &st->info.bhfi)) {
st->file_id_p = FALSE;