#define WX_USR (S_IWUSR | S_IXUSR)
+/* Include this before libintl.h so we get our definition of PARAMS. */
+#include "makepath.h"
+
#if HAVE_LOCALE_H
# include <locale.h>
#endif
#endif
#include "save-cwd.h"
-#include "makepath.h"
#include "error.h"
void strip_trailing_slashes ();
if (!created_dir)
{
struct stat stats;
+ int saved_errno = errno;
/* The mkdir and stat calls below may appear to be reversed.
They are not. It is important to call mkdir first and then to
if (stat (dir, &stats))
{
- error (0, errno, _("cannot create directory `%s'"), dirpath);
+ error (0, saved_errno, _("cannot create directory `%s'"), dirpath);
fail = 1;
}
else if (!S_ISDIR (stats.st_mode))