summaryrefslogtreecommitdiff
path: root/gio/gfile.c
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@endlessos.org>2021-10-21 11:13:29 +0100
committerPhilip Withnall <pwithnall@endlessos.org>2021-10-21 12:23:06 +0100
commitb6424b5ce101309a89b6c8686305c60f10a82966 (patch)
tree4a5393a2fa5238ad87653748b1e2ca882e021d9a /gio/gfile.c
parente508a0a8df872cbf1632f8723cbf08c855d6cac0 (diff)
downloadglib-b6424b5ce101309a89b6c8686305c60f10a82966.tar.gz
gfileenumerator: Warn if name is not available for get_child()
`standard::name` must be available for `g_file_enumerator_get_child()` to work. Emit a critical warning and return if it’s not. This is similar to the existing behaviour in `g_file_enumerator_iterate()`. Improve the documentation to mention this. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #2507
Diffstat (limited to 'gio/gfile.c')
-rw-r--r--gio/gfile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gio/gfile.c b/gio/gfile.c
index d7feca6b9..17aee12a7 100644
--- a/gio/gfile.c
+++ b/gio/gfile.c
@@ -1025,7 +1025,9 @@ g_file_resolve_relative_path (GFile *file,
* "standard::*" means all attributes in the standard namespace.
* An example attribute query be "standard::*,owner::user".
* The standard attributes are available as defines, like
- * #G_FILE_ATTRIBUTE_STANDARD_NAME.
+ * #G_FILE_ATTRIBUTE_STANDARD_NAME. #G_FILE_ATTRIBUTE_STANDARD_NAME should
+ * always be specified if you plan to call g_file_enumerator_get_child() or
+ * g_file_enumerator_iterate() on the returned enumerator.
*
* If @cancellable is not %NULL, then the operation can be cancelled
* by triggering the cancellable object from another thread. If the