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 532562 - add g_dir_read_name_stat()
add g_dir_read_name_stat()
Status: RESOLVED DUPLICATE of bug 532501
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2008-05-10 23:34 UTC by Loïc Minier
Modified: 2008-05-15 05:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add g_dir_read_name_stat() (5.31 KB, patch)
2008-05-10 23:34 UTC, Loïc Minier
none Details | Review

Description Loïc Minier 2008-05-10 23:34:30 UTC
Hi,

Florian Ragwitz reported in Debian bug http://bugs.debian.org/480497:
"""
glib currently provides g_dir_read_name for reading the contents of a
directory. It's a quite common operation to first get a directory entry
and stat() it directly afterwards. When using g_dir_read_name this
currently requires you build the full path name to the directory entry
using g_build_filename() (or something similar) and to call g_{,l}stat
for getting the file information.

This is not only unconvenient but also ineffective on platforms that
provide fstatat(). The patch at

http://files.perldition.org/g_dir_read_name_stat.patch

implements a g_dir_read_name_stat function that reads the name of the
next directory entry from a GDir, just like g_dir_read_name does, and
stats if afterwards. It uses fstatat() where available.
"""

I'll attach this patch,

Bye
Comment 1 Loïc Minier 2008-05-10 23:34:55 UTC
Created attachment 110704 [details] [review]
add g_dir_read_name_stat()
Comment 2 Matthias Clasen 2008-05-15 05:08:07 UTC
duplicate bug propagation considered harmful :-)

*** This bug has been marked as a duplicate of 532501 ***