forked from enlightenment/enlightenment
fix sorting to sort symlinks to dirs as if they are dirs...
SVN revision: 75695
This commit is contained in:
parent
d69846caa0
commit
cf863adc59
|
@ -7687,34 +7687,15 @@ _e_fm2_cb_icon_sort(const void *data1, const void *data2)
|
|||
if ((S_ISDIR(ic1->info.statinfo.st_mode)) !=
|
||||
(S_ISDIR(ic2->info.statinfo.st_mode)))
|
||||
{
|
||||
if ((!!ic1->info.link) != (!!ic2->info.link))
|
||||
{
|
||||
if (!ic1->info.link) return -1;
|
||||
return 1;
|
||||
}
|
||||
if (S_ISDIR(ic1->info.statinfo.st_mode)) return -1;
|
||||
return 1;
|
||||
}
|
||||
if ((S_ISDIR(ic1->info.statinfo.st_mode)) &&
|
||||
(S_ISDIR(ic2->info.statinfo.st_mode)))
|
||||
{
|
||||
if ((!!ic1->info.link) != (!!ic2->info.link))
|
||||
{
|
||||
if (!ic1->info.link) return -1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ic1->sd->config->list.sort.dirs.last)
|
||||
{
|
||||
if ((S_ISDIR(ic1->info.statinfo.st_mode)) !=
|
||||
(S_ISDIR(ic2->info.statinfo.st_mode)))
|
||||
{
|
||||
if ((!!ic1->info.link) != (!!ic2->info.link))
|
||||
{
|
||||
if (!ic1->info.link) return -1;
|
||||
return 1;
|
||||
}
|
||||
if (S_ISDIR(ic1->info.statinfo.st_mode)) return 1;
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue