git-svn-id: svn://db.shs.com.ru/pip@179 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -214,6 +214,13 @@ bool PIDir::make(bool withParents) {
|
||||
}
|
||||
|
||||
|
||||
#ifdef WINDOWS
|
||||
int sort_compare(const PIFile::FileInfo * v0, const PIFile::FileInfo * v1) {
|
||||
return strcoll(v0->path.data(), v1->path.data());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
PIVector<PIFile::FileInfo> PIDir::entries() {
|
||||
PIVector<PIFile::FileInfo> l;
|
||||
if (!isExists()) return l;
|
||||
@@ -251,6 +258,7 @@ PIVector<PIFile::FileInfo> PIDir::entries() {
|
||||
memset(&fd, 0, sizeof(fd));
|
||||
} while (FindNextFile(hf, &fd) != 0);
|
||||
FindClose(hf);
|
||||
l.sort(sort_compare);
|
||||
if (!hdd) {
|
||||
PIFile::FileInfo fi;
|
||||
fi.path = "..";
|
||||
@@ -258,6 +266,7 @@ PIVector<PIFile::FileInfo> PIDir::entries() {
|
||||
l.push_front(fi);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
dirent ** list;
|
||||
int cnt = scandir(
|
||||
|
||||
Reference in New Issue
Block a user