… | |
… | |
1061 | { |
1061 | { |
1062 | /* in this case, all is known, and we just put dirs first and sort them */ |
1062 | /* in this case, all is known, and we just put dirs first and sort them */ |
1063 | eio_dirent *ent = dents + dentoffs; |
1063 | eio_dirent *ent = dents + dentoffs; |
1064 | eio_dirent *dir = dents; |
1064 | eio_dirent *dir = dents; |
1065 | |
1065 | |
|
|
1066 | /* now move dirs to the front, and non-dirs to the back */ |
|
|
1067 | /* by walkign from both sides and swapping if necessary */ |
1066 | while (ent > dir) |
1068 | while (ent > dir) |
1067 | { |
1069 | { |
1068 | if (dir->type == DT_DIR) |
1070 | if (dir->type == DT_DIR) |
1069 | ++dir; |
1071 | ++dir; |
1070 | else |
1072 | else |