Skip to content

Commit

Permalink
fixed case in filename extension inside directory
Browse files Browse the repository at this point in the history
  • Loading branch information
michelerenzullo committed Mar 29, 2021
1 parent 23696f1 commit feacac8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions XMPConverter/XMPconverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ void read_directory(const string& name, std::vector<string>& v) {
while ((dp = readdir(dirp)) != NULL) {
char* check_extension;
if (check_extension = strrchr(dp->d_name, '.')) {
for (uint32 i = 0; i < strlen(check_extension); ++i)
check_extension[i] = tolower(check_extension[i]);
string filename = dp->d_name;
for (uint32 i = 0; i < strlen(check_extension); ++i) check_extension[i] = tolower(check_extension[i]);
if (check_extension != NULL && (strcmp(check_extension, ".cube") == 0 xor strcmp(check_extension, ".xmp") == 0))
v.push_back(name + "/" + string(dp->d_name));
v.push_back(name + "/" + filename);
}
}
closedir(dirp);
Expand Down

0 comments on commit feacac8

Please sign in to comment.