diff --git a/direct/src/plugin/p3dInstanceManager.cxx b/direct/src/plugin/p3dInstanceManager.cxx index 90b01f2b44..af0f1c6bbf 100644 --- a/direct/src/plugin/p3dInstanceManager.cxx +++ b/direct/src/plugin/p3dInstanceManager.cxx @@ -35,6 +35,8 @@ #ifdef _WIN32 #include +#include // chmod() +#include // rmdir() #else #include #include @@ -1073,7 +1075,7 @@ delete_directory_recursively(const string &root_dir) { if (result == 0) { nout << "Deleted " << root_dir << "\n"; } else { - if (access(root_dir.c_str(), F_OK) == 0) { + if (access(root_dir.c_str(), 0) == 0) { nout << "Could not delete " << root_dir << "\n"; } } @@ -1123,7 +1125,7 @@ delete_directory_recursively(const string &root_dir) { if (result == 0) { nout << "Removed directory " << root_dir << "\n"; } else { - if (access(pathname.c_str(), F_OK) == 0) { + if (access(pathname.c_str(), 0) == 0) { nout << "Could not remove directory " << root_dir << "\n"; } }