diff options
author | Pierre Joye <pierre.php@gmail.com> | 2021-08-28 10:52:19 +0700 |
---|---|---|
committer | Pierre Joye <pierre.php@gmail.com> | 2021-08-28 10:52:19 +0700 |
commit | 9f597cb6d9ee30ff2b7cd28f0f3b192f94497456 (patch) | |
tree | f1c77bac24abb8bdea1a75bae602f6d7f207f2b5 /tests | |
parent | 472930f6e1593392661e2459f1254659d047ba01 (diff) | |
download | libgd-9f597cb6d9ee30ff2b7cd28f0f3b192f94497456.tar.gz |
fix windows build
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gdtest/gdtest.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c index 0548690..92064d9 100644 --- a/tests/gdtest/gdtest.c +++ b/tests/gdtest/gdtest.c @@ -84,15 +84,14 @@ int gdTestIsDir(char *path) { #if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) WIN32_FILE_ATTRIBUTE_DATA data; - if (!GetFileAttributesEx(de->d_name, GetFileExInfoStandard, &data)) { + if (!GetFileAttributesEx(path, GetFileExInfoStandard, &data)) { continue; } if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - _clean_dir(de->d_name); + return 0; } else { - unlink(de->d_name); + return 1; } - #else struct stat st; if (lstat(path, &st) != 0) |