oops, forgot some
This commit is contained in:
parent
2b9849a9c5
commit
492a3511c5
2 changed files with 1 additions and 20 deletions
2
ccc.c
2
ccc.c
|
@ -544,8 +544,6 @@ void populate_files(const char *path, int ftype)
|
||||||
|
|
||||||
add_file_stat(filename, path, ftype);
|
add_file_stat(filename, path, ftype);
|
||||||
}
|
}
|
||||||
free(filename);
|
|
||||||
free(path);
|
|
||||||
}
|
}
|
||||||
if (ftype == 0) {
|
if (ftype == 0) {
|
||||||
files = arraylist_init(tmp1->length + tmp2->length);
|
files = arraylist_init(tmp1->length + tmp2->length);
|
||||||
|
|
19
file.c
19
file.c
|
@ -77,25 +77,8 @@ void arraylist_remove(ArrayList *list, long index)
|
||||||
*/
|
*/
|
||||||
void arraylist_add(ArrayList *list, char *name, char *path, char *stats, char *type, wchar_t *icon, int color, bool marked, bool force)
|
void arraylist_add(ArrayList *list, char *name, char *path, char *stats, char *type, wchar_t *icon, int color, bool marked, bool force)
|
||||||
{
|
{
|
||||||
char *name_cp = NULL;
|
|
||||||
char *path_cp = NULL;
|
|
||||||
char *type_cp = NULL;
|
|
||||||
char *stats_cp = NULL;
|
|
||||||
wchar_t *icon_cp = NULL;
|
|
||||||
|
|
||||||
if (name != NULL)
|
|
||||||
name_cp = estrdup(name);
|
|
||||||
if (path != NULL)
|
|
||||||
path_cp = estrdup(path);
|
|
||||||
if (type != NULL)
|
|
||||||
type_cp = estrdup(type);
|
|
||||||
if (stats != NULL)
|
|
||||||
stats_cp = estrdup(stats);
|
|
||||||
if (icon != NULL)
|
|
||||||
icon_cp = ewcsdup(icon);
|
|
||||||
|
|
||||||
/* name, path, stats, type, icon, color */
|
/* name, path, stats, type, icon, color */
|
||||||
file new_file = { name_cp, path_cp, type_cp, stats_cp, icon_cp, color };
|
file new_file = { name, path, type, stats, icon, color };
|
||||||
|
|
||||||
if (list->capacity != list->length) {
|
if (list->capacity != list->length) {
|
||||||
if (marked) {
|
if (marked) {
|
||||||
|
|
Loading…
Reference in a new issue