mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-08 22:00:06 +02:00
Bug 561807 – inotify_sub.c :: dup_dirname() fails to remove trailing '/'
2008-11-28 Matthias Clasen <mclasen@redhat.com> Bug 561807 – inotify_sub.c :: dup_dirname() fails to remove trailing '/' * inotify/inotify-sub.c (dup_dirname): Actually strip the trailing '/' away. Spotted by Dan Williams. ` svn path=/trunk/; revision=7682
This commit is contained in:
parent
ec59607150
commit
6a0f0c2bfb
@ -1,3 +1,11 @@
|
|||||||
|
2008-11-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Bug 561807 – inotify_sub.c :: dup_dirname() fails to remove trailing
|
||||||
|
'/'
|
||||||
|
|
||||||
|
* inotify/inotify-sub.c (dup_dirname): Actually strip the trailing
|
||||||
|
'/' away. Spotted by Dan Williams.
|
||||||
|
|
||||||
2008-11-21 Cosimo Cecchi <cosimoc@gnome.org>
|
2008-11-21 Cosimo Cecchi <cosimoc@gnome.org>
|
||||||
|
|
||||||
Bug 561375 – Leaks mountpoint description
|
Bug 561375 – Leaks mountpoint description
|
||||||
|
@ -38,8 +38,8 @@ dup_dirname (const gchar *dirname)
|
|||||||
gchar *d_dirname = g_strdup (dirname);
|
gchar *d_dirname = g_strdup (dirname);
|
||||||
size_t len = strlen (d_dirname);
|
size_t len = strlen (d_dirname);
|
||||||
|
|
||||||
if (d_dirname[len] == '/')
|
if (d_dirname[len - 1] == '/')
|
||||||
d_dirname[len] = '\0';
|
d_dirname[len - 1] = '\0';
|
||||||
|
|
||||||
return d_dirname;
|
return d_dirname;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user