From ccce7b11c0ca1241cfa7c4847c99af0641746108 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Mon, 28 Sep 2015 16:32:37 +0100 Subject: [PATCH] Plot: use of new mkdir function from LatCore --- lib/Plot.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/Plot.cpp b/lib/Plot.cpp index 6a5db37..d65d6c9 100644 --- a/lib/Plot.cpp +++ b/lib/Plot.cpp @@ -534,12 +534,9 @@ void Plot::save(string dirName) commandBack = plotCommand_; // generate directory - if (access(dirName.c_str(), R_OK|W_OK|X_OK)) + if (mkdir(dirName)) { - if (mkdir(dirName.c_str(), mode755)) - { - LATAN_ERROR(Io, "impossible to create directory '" + dirName + "'"); - } + LATAN_ERROR(Io, "impossible to create directory '" + dirName + "'"); } // save PDF