Closed pbtrung closed 6 years ago
bool fs_is_file(const char* path, size_t length) On Arch Linux if path does not exist, returned value is random. Solution:
bool fs_is_file(const char* path, size_t length)
path
int rc = stat(finalpath.str, &st); if (rc == 0 && (st.st_mode & S_IFREG)) return true;
Added stat return value checks and unified the file/dir checks in 052e7e015
Looks good now. Thanks.
bool fs_is_file(const char* path, size_t length)
On Arch Linux ifpath
does not exist, returned value is random. Solution: