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
+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
/* 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);