g_free (console_handle->filename);
- if (fd > 2)
+ if (fd > 2) {
+ if (console_handle->share_info)
+ _wapi_handle_share_release (console_handle->share_info);
close (fd);
+ }
}
static WapiFileType console_getfiletype(void)
/* No filename with pipe handles */
+ if (pipe_handle->share_info)
+ _wapi_handle_share_release (pipe_handle->share_info);
+
close (fd);
}
#endif
if (S_ISFIFO (statbuf.st_mode)) {
handle_type = WAPI_HANDLE_PIPE;
+ /* maintain invariant that pipes have no filename */
+ file_handle.filename = NULL;
+ g_free (filename);
+ filename = NULL;
} else if (S_ISCHR (statbuf.st_mode)) {
handle_type = WAPI_HANDLE_CONSOLE;
} else {
if (state->fsname_index == 1 && state->fsname [0] == '/')
ignore_entry = FALSE;
- else if (state->fsname_index == 0 || memcmp ("none", state->fsname, state->fsname_index) == 0)
+ else if (memcmp ("overlay", state->fsname, state->fsname_index) == 0 ||
+ memcmp ("aufs", state->fstype, state->fstype_index) == 0) {
+ /* Don't ignore overlayfs and aufs - these might be used on Docker
+ * (https://bugzilla.xamarin.com/show_bug.cgi?id=31021) */
+ ignore_entry = FALSE;
+ } else if (state->fsname_index == 0 || memcmp ("none", state->fsname, state->fsname_index) == 0) {
ignore_entry = TRUE;
- else if (state->fstype_index >= 5 && memcmp ("fuse.", state->fstype, 5) == 0) {
+ } else if (state->fstype_index >= 5 && memcmp ("fuse.", state->fstype, 5) == 0) {
/* Ignore GNOME's gvfs */
if (state->fstype_index == 21 && memcmp ("fuse.gvfs-fuse-daemon", state->fstype, state->fstype_index) == 0)
ignore_entry = TRUE;