From b0eef9af247c5e06451b82e2ada82351158f5f5f Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Mon, 24 Sep 2007 21:13:50 +0200 Subject: [PATCH] Do not return EFAULT for ERROR_INVALID_NAME. A file name that contains a colon will be rejected by GeFileInformation() with ERROR_INVALID_NAME. This must be treated as ENOENT. Such a file name ends up in do_lstat() when the rev:path notation is used (eg. in 'git show'). --- compat/mingw.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/compat/mingw.c b/compat/mingw.c index 166e2ad5f0..af522f1666 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -76,9 +76,6 @@ static int do_lstat(const char *file_name, struct stat *buf) case ERROR_NOT_ENOUGH_MEMORY: errno = ENOMEM; break; - case ERROR_INVALID_NAME: - errno = EFAULT; - break; default: errno = ENOENT; break;