|
|
|
|
|
by lew89
1908 days ago
|
|
There is missing NULL check, but it doesn't crash, because the function would get nonexistent filename only if filesystem driver would do something strange (or file would be deleted just between readdir and fopen). xD
I also noticed, that I don't close files and directories. Not a big deal, because fully functional and 100% correct program wasn't the goal here. :) EDIT: Actually fopen would return NULL when file is not readable. My bad. Anyway, such problems are trivial to debug. |
|