mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-04-03 11:30:39 +02:00
2002-02-12 Havoc Pennington <hp@redhat.com>
Author: hp Date: 2002-02-12 21:30:57 GMT 2002-02-12 Havoc Pennington <hp@redhat.com> * pkg.c (scan_dir): use g_strdup, and fix the location where we assign the nul byte, so we don't mangle things for directories that end in '/' - reported by Enrico Scholz
This commit is contained in:
parent
e810d6b406
commit
3e813e2dfc
2 changed files with 8 additions and 2 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2002-02-12 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* pkg.c (scan_dir): use g_strdup, and fix the location where
|
||||
we assign the nul byte, so we don't mangle things for directories
|
||||
that end in '/' - reported by Enrico Scholz
|
||||
|
||||
2002-02-07 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* configure.in: 0.11.0
|
||||
|
|
|
|||
4
pkg.c
4
pkg.c
|
|
@ -101,12 +101,12 @@ scan_dir (const char *dirname)
|
|||
/* Use a copy of dirname cause Win32 opendir doesn't like
|
||||
* superfluous trailing (back)slashes in the directory name.
|
||||
*/
|
||||
char *dirname_copy = strdup (dirname);
|
||||
char *dirname_copy = g_strdup (dirname);
|
||||
|
||||
if (dirnamelen > 1 && dirname[dirnamelen-1] == G_DIR_SEPARATOR)
|
||||
{
|
||||
dirnamelen--;
|
||||
dirname_copy[dirnamelen-1] = '\0';
|
||||
dirname_copy[dirnamelen] = '\0';
|
||||
}
|
||||
|
||||
dir = opendir (dirname_copy);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue