Created
February 15, 2012 16:54
-
-
Save marek-safar/1837274 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mcs/class/corlib/System.IO/MonoIOStat.cs b/mcs/class/corlib/System.IO/MonoIOStat.cs | |
index a3177c2..a524b88 100644 | |
--- a/mcs/class/corlib/System.IO/MonoIOStat.cs | |
+++ b/mcs/class/corlib/System.IO/MonoIOStat.cs | |
@@ -35,7 +35,6 @@ using System; | |
namespace System.IO | |
{ | |
internal struct MonoIOStat { | |
- public string Name; | |
public FileAttributes Attributes; | |
public long Length; | |
public long CreationTime; | |
diff --git a/mono/metadata/file-io.c b/mono/metadata/file-io.c | |
index 6f1f3c3..efb3535 100644 | |
--- a/mono/metadata/file-io.c | |
+++ b/mono/metadata/file-io.c | |
@@ -174,21 +174,13 @@ static gint64 convert_filetime (const FILETIME *filetime) | |
return (gint64)ticks; | |
} | |
-static void convert_win32_file_attribute_data (const WIN32_FILE_ATTRIBUTE_DATA *data, const gunichar2 *name, MonoIOStat *stat) | |
+static void convert_win32_file_attribute_data (const WIN32_FILE_ATTRIBUTE_DATA *data, MonoIOStat *stat) | |
{ | |
- int len; | |
- | |
stat->attributes = data->dwFileAttributes; | |
stat->creation_time = convert_filetime (&data->ftCreationTime); | |
stat->last_access_time = convert_filetime (&data->ftLastAccessTime); | |
stat->last_write_time = convert_filetime (&data->ftLastWriteTime); | |
stat->length = ((gint64)data->nFileSizeHigh << 32) | data->nFileSizeLow; | |
- | |
- len = 0; | |
- while (name [len]) | |
- ++ len; | |
- | |
- MONO_STRUCT_SETREF (stat, name, mono_string_new_utf16 (mono_domain_get (), name, len)); | |
} | |
/* Managed file attributes have nearly but not quite the same values | |
@@ -733,9 +725,7 @@ ves_icall_System_IO_MonoIO_GetFileStat (MonoString *path, MonoIOStat *stat, | |
result = get_file_attributes_ex (mono_string_chars (path), &data); | |
if (result) { | |
- convert_win32_file_attribute_data (&data, | |
- mono_string_chars (path), | |
- stat); | |
+ convert_win32_file_attribute_data (&data, stat); | |
} else { | |
*error=GetLastError (); | |
memset (stat, 0, sizeof (MonoIOStat)); | |
diff --git a/mono/metadata/file-io.h b/mono/metadata/file-io.h | |
index 2bc54ce..be38d61 100644 | |
--- a/mono/metadata/file-io.h | |
+++ b/mono/metadata/file-io.h | |
@@ -67,7 +67,6 @@ typedef enum { | |
/* This is a copy of System.IO.MonoIOStat */ | |
typedef struct _MonoIOStat { | |
- MonoString *name; | |
gint32 attributes; | |
gint64 length; | |
gint64 creation_time; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment