win32.c
branch0.5
changeset 5466 85b7662d0342
parent 5455 547cba149cbd
child 5470 9fce095970bb
--- a/win32.c	Mon Mar 19 20:05:49 2007 +0000
+++ b/win32.c	Mon Mar 19 20:17:24 2007 +0000
@@ -743,7 +743,6 @@
 	// hectonanoseconds between Windows and POSIX epoch
 	static const int64 posix_epoch_hns = 0x019DB1DED53E8000LL;
 	const WIN32_FIND_DATAW *fd = &ent->dir->fd;
-	if (fd->dwFileAttributes & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) return false;
 
 	sb->st_size  = ((uint64) fd->nFileSizeHigh << 32) + fd->nFileSizeLow;
 	/* UTC FILETIME to seconds-since-1970 UTC
@@ -757,6 +756,11 @@
 	return true;
 }
 
+bool FiosIsHiddenFile(const struct dirent *ent)
+{
+	return (ent->dir->fd.dwFileAttributes & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) != 0;
+}
+
 bool FiosGetDiskFreeSpace(const char *path, uint32 *tot)
 {
 	UINT sem = SetErrorMode(SEM_FAILCRITICALERRORS);  // disable 'no-disk' message box