summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2021-04-29 16:53:32 +0100
committerAntónio Fernandes <antoniof@gnome.org>2021-04-30 11:52:45 +0100
commite9e026df886937d183889520f6414eeea978bc29 (patch)
treeb47cd049ca1a4b323cfbef9d7998730c0a9e7db0 /eel
parent66e7223258b4a220f6987b6a9d7caca314a0c4ad (diff)
downloadnautilus-e9e026df886937d183889520f6414eeea978bc29.tar.gz
eel-vfs-extensions: Document get_extension_offset1841-crashing-when-copying-folder-with-same-name-and-click-to-rename
Mostly to remember callers must be ready to handle a NULL return value, trying to prevent more bugs like the one fixed by the previous commit.
Diffstat (limited to 'eel')
-rw-r--r--eel/eel-vfs-extensions.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/eel/eel-vfs-extensions.c b/eel/eel-vfs-extensions.c
index afdf0621a..ea9ef2b3e 100644
--- a/eel/eel-vfs-extensions.c
+++ b/eel/eel-vfs-extensions.c
@@ -107,6 +107,15 @@ eel_uri_is_in_xdg_dirs (const gchar *uri)
return has_prefix;
}
+/**
+ * eel_filename_get_extension_offset:
+ * @filename: a null-terminated string representing the basename of a file, with
+ * or without extension.
+ *
+ * Returns: (nullable) (transfer none): A pointer to the substring containing
+ * the dot and extension, or %NULL if there
+ * is no extension.
+ */
char *
eel_filename_get_extension_offset (const char *filename)
{