gfileutils: Add a comment in g_canonicalize_filename()

Clarify the code a little. This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2021-12-02 11:32:25 +00:00
parent 5ab008a50c
commit 3421a703ca

View File

@ -2775,6 +2775,8 @@ g_canonicalize_filename (const gchar *filename,
output--)
*output = G_DIR_SEPARATOR;
/* 1 to re-increment after the final decrement above (so that output >= canon),
* and 1 to skip the first `/` */
output += 2;
/* POSIX allows double slashes at the start to mean something special