bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] mkdir-p: Don't discard stat error


From: Niklas Hambüchen
Subject: Re: [PATCH] mkdir-p: Don't discard stat error
Date: Sun, 16 Dec 2018 14:14:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

On 15/12/2018 1:27 AM, Paul Eggert wrote:
+                  if (stat (dir + prefix_len, &st) == 0
+                      && S_ISDIR (st.st_mode))

That patch doesn't look quite right, since it can use errno even when stat 
succeeded (in which case errno contains garbage).

Oops, you're right, that doesn't make any sense, keeping more checks than the 
syscall one in the condition is wrong. My bad.

I installed the attached instead; please give it a try.

That looks good. I've also tried it with coreutils and it works as expected.

Thanks!



reply via email to

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