
Enviado em 22/10/2018 - 18:25h
Olá a todos!{
struct dirent **namelist;
int n,i;
if (!entry || !container)
return;
n = scandir (container, &namelist, 0, alphasort);
if (n < 0)
{
perror ("scandir");
return;
}
for (i = 0; i < n; i++)
{
struct stat st;
char *fullpath = NULL;
if (namelist[i]->d_name[0] == '.')
{
free (namelist[i]);
continue;
}
fullpath = (char *)
malloc (strlen (container) + strlen (namelist[i]->d_name) + 2);
sprintf (fullpath, "%s/%s", container, namelist[i]->d_name);
log_verbose ("%s\n", fullpath);
if (stat (fullpath, &st) < 0)
{
free (namelist[i]);
free (fullpath);
continue;
}
if (S_ISDIR (st.st_mode))
{
struct upnp_entry_t *child = NULL;
child = upnp_entry_new (ut, namelist[i]->d_name,
fullpath, entry, 0, true);
if (child)
{
metadata_add_container (ut, child, fullpath);
upnp_entry_add_child (ut, entry, child);
}
}
else
metadata_add_file (ut, entry, fullpath, namelist[i]->d_name, &st);
free (namelist[i]);
free (fullpath);
}
free (namelist);
}
Papagaiando o XFCE com temas e recursos
WhatsApp com Chamadas no Linux via Waydroid
XFCE - quase um Gnome ou Plasma mas muito mais leve
LXQT - funcional para máquinas pererecas e usuários menos exigentes
Recuperando arquivos com o Photorec de discos zoados
Usando o --load-average no Gentoo para evitar OOM Kill
Instalando o COSMIC DE no Gentoo (systemd)
Problemas com o "startx&... no Slackware (13)
Ajudante para criar dicas e artigos no VOL (5)









