use older stat tools. TurboC doesn't know what S_ISDIR is
Some checks failed
Build / build (push) Failing after 32s

This commit is contained in:
Gregory Gauthier 2026-02-04 16:20:29 +00:00
parent 602f941dd3
commit b54f0119fc
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -2,4 +2,5 @@
.grok/
.idea/
.vscode/
.DS_Store
build/

View File

@ -11,8 +11,8 @@ int ensure_directory_exists(const char *path) {
struct stat st;
if (stat(path, &st) == 0) {
/* Path exists, check if it's a directory */
if (S_ISDIR(st.st_mode)) {
/* Path exists, check if it's a directory using bit test */
if ((st.st_mode & S_IFMT) == S_IFDIR) {
return 1;
} else {
fprintf(stderr, "Error: %s exists but is not a directory\n", path);