After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 672219 - GFileEnumerator return wrong file type for symlinked directories on NTFS volumes
GFileEnumerator return wrong file type for symlinked directories on NTFS volumes
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-03-16 10:30 UTC by Stefano Facchini
Modified: 2018-05-24 13:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
localfileenumerator: don't trust readdir() when reports DT_DIR (836 bytes, patch)
2012-03-16 10:44 UTC, Stefano Facchini
none Details | Review
workaround (838 bytes, patch)
2012-03-16 10:57 UTC, Stefano Facchini
none Details | Review

Description Stefano Facchini 2012-03-16 10:30:21 UTC
After commit 8863071b9d17fa37036549b8c6579736d259a9cd GFileEnumerator uses readdir() calls (when available, e.g. under linux), to obtain file type info. This does not always work for files on NTFS volumes. Namely, a symlink to a directory is reported as a normal directory, even with G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS flag.
Comment 1 Stefano Facchini 2012-03-16 10:44:02 UTC
Created attachment 209913 [details] [review]
localfileenumerator: don't trust readdir() when reports DT_DIR

--

In case it is decided that this is not a NOTGNOME, a possible workaround
is not trusting the readdir() result "DT_DIR"
Comment 2 Stefano Facchini 2012-03-16 10:57:52 UTC
Created attachment 209918 [details] [review]
workaround

If it is decided that this is not a NOTGNOME, a possible workaround is not trusting the readdir() result "DT_DIR"
Comment 3 Benjamin Otte (Company) 2012-03-16 13:52:21 UTC
Isn't that a bug in the NTFS implementation of your kernel of choice rather than a bug in gio?
Comment 4 Erik van Pienbroek 2012-08-18 12:58:12 UTC
I just did some more research and it indeed is a bug in ntfs-3g.
I filed this bug upstream along with a simple testcase and they have already created a fix for it. When applied this issue is resolved automatically by it.

Upstream bugreport with patch: http://tuxera.com/forum/viewtopic.php?f=2&t=29578
Comment 5 GNOME Infrastructure Team 2018-05-24 13:51:07 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/524.