22 lines
627 B
Plaintext
22 lines
627 B
Plaintext
$OpenBSD: patch-Source_kwsys_SystemTools_cxx,v 1.12 2013/06/06 12:47:06 dcoppa Exp $
|
|
|
|
Don't spam systrace by attempting to create dirs which already exist.
|
|
|
|
--- Source/kwsys/SystemTools.cxx.orig Wed May 15 19:38:13 2013
|
|
+++ Source/kwsys/SystemTools.cxx Tue May 28 20:02:19 2013
|
|
@@ -231,11 +231,13 @@ inline void Realpath(const char *path, kwsys_stl::stri
|
|
}
|
|
#else
|
|
#include <sys/types.h>
|
|
+#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
#include <unistd.h>
|
|
inline int Mkdir(const char* dir)
|
|
{
|
|
- return mkdir(dir, 00777);
|
|
+ struct stat sb;
|
|
+ return stat(dir, &sb) && mkdir(dir, 00777);
|
|
}
|
|
inline int Rmdir(const char* dir)
|
|
{
|