From cbdbf5e58ea01a80e3d355099aad1f2117d47863 Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 8 May 2006 15:40:33 +0000 Subject: Fix return code of CCTK_CreateDirectory() if it already exists. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4292 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/util/File.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/util') diff --git a/src/util/File.c b/src/util/File.c index d0bfc542..326f4a0b 100644 --- a/src/util/File.c +++ b/src/util/File.c @@ -136,6 +136,7 @@ int CCTK_CreateDirectory (int mode, const char *pathname) { if (stat (pathname, &statbuf)) { + retval = 0; if (MKDIR_WRAPPER (pathname, mode) == -1) { retval = errno == EEXIST ? 1 : -2; -- cgit v1.2.3