cvs-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cvs-cvs] ccvs/src ChangeLog subr.c


From: Mark D. Baushke
Subject: [Cvs-cvs] ccvs/src ChangeLog subr.c
Date: Wed, 23 Jan 2008 07:09:30 +0000

CVSROOT:        /cvsroot/cvs
Module name:    ccvs
Changes by:     Mark D. Baushke <mdb>   08/01/23 07:09:30

Modified files:
        src            : ChangeLog subr.c 

Log message:
        * subr.c (mkdir_i): Save/restore errno around isdir().

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&r1=1.3554&r2=1.3555
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/subr.c?cvsroot=cvs&r1=1.164&r2=1.165

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.3554
retrieving revision 1.3555
diff -u -b -r1.3554 -r1.3555
--- ChangeLog   23 Jan 2008 05:17:20 -0000      1.3554
+++ ChangeLog   23 Jan 2008 07:09:30 -0000      1.3555
@@ -1,5 +1,7 @@
 2008-01-22  Mark D. Baushke  <address@hidden>
 
+       * subr.c (mkdir_i): Save/restore errno around isdir().
+
        * subr.c (mkdir_i): Check to see if the directory already exists.
        (The Solaris mkdir() returns an EACCESS rather than EEXISTS error
        when a swap filesystem is used and when access is bad to create

Index: subr.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/subr.c,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -b -r1.164 -r1.165
--- subr.c      23 Jan 2008 05:17:21 -0000      1.164
+++ subr.c      23 Jan 2008 07:09:30 -0000      1.165
@@ -2207,11 +2207,14 @@
         const char *update_dir, unsigned int flags)
 {
     bool err = mkdir (name, mode);
+    int saved_errno = errno;
+
     if (err && !(flags & MD_EXIST_OK && (errno == EEXIST || isdir (name)))
        && (flags & MD_FATAL || !(flags & MD_QUIET)))
     {
        bool uud = update_dir && strlen (update_dir)
                   && !STREQ (update_dir, ".");
+       errno = saved_errno;
        error (flags & MD_FATAL, errno, "cannot make directory `%s%s%s'",
               uud ? update_dir : "", uud ? "/" : "", name);
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]