diff options
-rw-r--r-- | src/util/File.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/util/File.c b/src/util/File.c index b6d5f770..cc0bc883 100644 --- a/src/util/File.c +++ b/src/util/File.c @@ -108,18 +108,24 @@ int CCTK_CreateDirectory (int mode, const char *pathname) if (stat (current, &statbuf)) { +#if 0 CCTK_VInfo ("Cactus", "Creating directory: '%s'", current); +#endif if (MKDIR_WRAPPER (current, mode) == -1) { +#if 0 CCTK_VWarn (0, __LINE__, __FILE__, "Cactus", "Failed to create directory '%s'", current); +#endif retval = -2; } } else if (! S_ISDIR (statbuf.st_mode)) { +#if 0 CCTK_VWarn (0, __LINE__, __FILE__, "Cactus", "'%s' exists but is not a directory", current); +#endif retval = -3; } else @@ -140,18 +146,24 @@ int CCTK_CreateDirectory (int mode, const char *pathname) { if (stat (pathname, &statbuf)) { +#if 0 CCTK_VInfo ("Cactus", "Creating directory: '%s'", pathname); +#endif if (MKDIR_WRAPPER (pathname, mode) == -1) { +#if 0 CCTK_VWarn (0, __LINE__, __FILE__, "Cactus", "Failed to create directory '%s'", pathname); +#endif retval = -2; } } else if (! S_ISDIR (statbuf.st_mode)) { +#if 0 CCTK_VWarn (0, __LINE__, __FILE__, "Cactus", "'%s' exists but is not a directory", pathname); +#endif retval = -3; } else @@ -163,11 +175,13 @@ int CCTK_CreateDirectory (int mode, const char *pathname) free (current); - } + } else { +#if 0 CCTK_Warn (0, __LINE__, __FILE__, "Cactus", "Failed to allocate some temporary memory"); +#endif retval = -1; } |