return(ret);
}
+static gchar *
+get_search_dir (MonoString *pattern)
+{
+ gchar *p;
+ gchar *result;
+
+ p = mono_string_to_utf8 (pattern);
+ result = g_path_get_dirname (p);
+ g_free (p);
+ return result;
+}
+
MonoArray *
ves_icall_System_IO_MonoIO_GetFileSystemEntries (MonoString *path,
MonoString *path_with_pattern,
return(NULL);
}
- utf8_path = mono_string_to_utf8 (path); /*If this raises there is not memory to release*/
+ utf8_path = get_search_dir (path_with_pattern);
names = g_ptr_array_new ();
do {
MONO_ARCH_SAVE_REGS;
*error=ERROR_SUCCESS;
+
+ MONO_CHECK_ARG_NULL (dest);
if (dest_offset + count > mono_array_length (dest))
return 0;
MONO_ARCH_SAVE_REGS;
*error=ERROR_SUCCESS;
+
+ MONO_CHECK_ARG_NULL (src);
if (src_offset + count > mono_array_length (src))
return 0;