@@ -991,9 +991,11 @@ namespace IGFD
991991 if (!a.use_count () || !b.use_count ())
992992 return false ;
993993
994+ // this code fail in c:\\Users with the link "All users". got a invalid comparator
995+ /*
994996 // use code from https://github.com/jackm97/ImGuiFileDialog/commit/bf40515f5a1de3043e60562dc1a494ee7ecd3571
995- // strict ordering for file/directory types beginning in '.'
996- // common on Linux platforms
997+ // strict ordering for file/directory types beginning in '.'
998+ // common on Linux platforms
997999 if (a->fileName[0] == '.' && b->fileName[0] != '.')
9981000 return false;
9991001 if (a->fileName[0] != '.' && b->fileName[0] == '.')
@@ -1002,6 +1004,7 @@ namespace IGFD
10021004 {
10031005 return (stricmp(a->fileName.c_str(), b->fileName.c_str()) < 0); // sort in insensitive case
10041006 }
1007+ */
10051008 if (a->fileType != b->fileType ) return (a->fileType == ' d' ); // directory in first
10061009 return (stricmp (a->fileName .c_str (), b->fileName .c_str ()) < 0 ); // sort in insensitive case
10071010 });
@@ -1017,6 +1020,8 @@ namespace IGFD
10171020 if (!a.use_count () || !b.use_count ())
10181021 return false ;
10191022
1023+ // this code fail in c:\\Users with the link "All users". got a invalid comparator
1024+ /*
10201025 // use code from https://github.com/jackm97/ImGuiFileDialog/commit/bf40515f5a1de3043e60562dc1a494ee7ecd3571
10211026 // strict ordering for file/directory types beginning in '.'
10221027 // common on Linux platforms
@@ -1028,14 +1033,7 @@ namespace IGFD
10281033 {
10291034 return (stricmp(a->fileName.c_str(), b->fileName.c_str()) > 0); // sort in insensitive case
10301035 }
1031- if (a->fileType != b->fileType )
1032- {
1033- // this code fail in c:^^Userd with the link "All users". got a invalid comparator
1034- // but dont know why...
1035- // if i comment that all is ok..
1036- bool res = (b->fileType != ' d' ); // directory in last
1037- return res; // directory in last
1038- }
1036+ */
10391037 return (stricmp (a->fileName .c_str (), b->fileName .c_str ()) > 0 ); // sort in insensitive case
10401038 });
10411039 }
0 commit comments