Folder sorting finished

This commit is contained in:
Alex Voinea 2019-11-26 15:49:45 +02:00
parent f5bdbcc0bd
commit 66e51aa298
No known key found for this signature in database
GPG Key ID: F5034E7CFCF2F973
1 changed files with 4 additions and 2 deletions

View File

@ -831,8 +831,10 @@ void CardReader::presort() {
#define _SORT_CMP_NODIR() (strcasecmp(name2, name1) > 0)
#define _SORT_CMP_TIME_NODIR() (((modification_date_bckp == modificationDate) && (modification_time_bckp < modificationTime)) || (modification_date_bckp < modificationDate))
#define _SORT_CMP_DIR(fs) ((dir1 == filenameIsDir) ? _SORT_CMP_NODIR() : (fs > 0 ? !dir1 : dir1))
#define _SORT_CMP_TIME_DIR(fs) ((dir1 == filenameIsDir) ? _SORT_CMP_TIME_NODIR() : (fs < 0 ? !dir1 : dir1))
#if HAS_FOLDER_SORTING
#define _SORT_CMP_DIR(fs) ((dir1 == filenameIsDir) ? _SORT_CMP_NODIR() : (fs > 0 ? filenameIsDir : !filenameIsDir))
#define _SORT_CMP_TIME_DIR(fs) ((dir1 == filenameIsDir) ? _SORT_CMP_TIME_NODIR() : (fs < 0 ? filenameIsDir : !filenameIsDir))
#endif
uint16_t counter = 0;
uint16_t total = 0;