Skip to content

Instantly share code, notes, and snippets.

@compholio
Created January 27, 2015 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save compholio/cd24523f6af13f1aafd3 to your computer and use it in GitHub Desktop.
Save compholio/cd24523f6af13f1aafd3 to your computer and use it in GitHub Desktop.
lstat hack
From 6901671908f0f95b6e262943de7c8fb8bcdbdca1 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Tue, 27 Jan 2015 15:02:21 -0700
Subject: lstat hack
---
dlls/ntdll/file.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index b856b3d..f9b144e 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -135,6 +135,7 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
int ret;
*attr = 0;
+#if 0
ret = lstat( path, st );
if (ret == -1) return ret;
if (S_ISLNK( st->st_mode ))
@@ -144,6 +145,10 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
/* is a symbolic link and a directory, consider these "reparse points" */
if (S_ISDIR( st->st_mode )) *attr |= FILE_ATTRIBUTE_REPARSE_POINT;
}
+#else
+ ret = stat( path, st );
+ if (ret == -1) return ret;
+#endif
*attr |= get_file_attributes( st );
return ret;
}
--
1.9.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment