From 96bccb89df54a8798fc2de79e4837655e06950db Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 2 Dec 2021 11:32:25 +0000 Subject: [PATCH] gfileutils: Add a comment in g_canonicalize_filename() Clarify the code a little. This introduces no functional changes. Signed-off-by: Philip Withnall --- glib/gfileutils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/glib/gfileutils.c b/glib/gfileutils.c index 5a161cb75..f2045ead9 100644 --- a/glib/gfileutils.c +++ b/glib/gfileutils.c @@ -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