Skip to content

Commit

Permalink
Merge pull request #58 from sigiesec/update-cute-files
Browse files Browse the repository at this point in the history
Update cute_files.h to upstream f04e37c5a8ba1c7ce385b0f38b584bec1056e831
  • Loading branch information
aras-p authored May 18, 2021
2 parents 4ab14f2 + dd8ade7 commit 8d13199
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/external/cute_files.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Licensing information can be found at the end of the file.
------------------------------------------------------------------------------
tinyfiles.h - v1.0
cute_files.h - v1.0
To create implementation (the function definitions)
#define CUTE_FILES_IMPLEMENTATION
Expand Down Expand Up @@ -241,7 +241,12 @@ void cf_traverse(const char* path, cf_callback_t* cb, void* udata)
while (dir.has_next)
{
cf_file_t file;
cf_read_file(&dir, &file);
int res = cf_read_file(&dir, &file);

if (res == 0) {
cf_dir_next(&dir);
continue;
}

if (file.is_dir && file.name[0] != '.')
{
Expand Down Expand Up @@ -390,7 +395,7 @@ int cf_match_ext(cf_file_t* file, const char* ext)
if (stat(file->path, &file->info))
return 0;

file->size = (int)file->info.st_size;
file->size = file->info.st_size;
cf_get_ext(file);

file->is_dir = S_ISDIR(file->info.st_mode);
Expand Down

0 comments on commit 8d13199

Please sign in to comment.