Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: mkdir -p buldtin is possibly incorrect?
- X-seq: zsh-workers 21466
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: mkdir -p buldtin is possibly incorrect?
- Date: Thu, 14 Jul 2005 21:18:53 +0100
- In-reply-to: <f6879d2c05071412024c9afaf9@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <f6879d2c05071412024c9afaf9@xxxxxxxxxxxxxx>
George Kouryachy wrote:
> Why do you use "lstat" instead of "stat" in line 130?
> I have my $HOME symlinked as "/home -> /var/home",
> so any first attempt to use completion smaps like tths:
> _store_cache:mkdir:16: cannot make directory `/home': file exists
Yes, it looks like you're right.
Index: Src/Modules/files.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/files.c,v
retrieving revision 1.12
diff -u -r1.12 files.c
--- Src/Modules/files.c 2 Jun 2004 22:15:00 -0000 1.12
+++ Src/Modules/files.c 14 Jul 2005 20:11:13 -0000
@@ -127,7 +127,7 @@
if(p) {
struct stat st;
- if(!lstat(rpath, &st) && S_ISDIR(st.st_mode))
+ if(!stat(rpath, &st) && S_ISDIR(st.st_mode))
return 0;
}
oumask = umask(0);
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Work: pws@xxxxxxx
Web: http://www.pwstephenson.fsnet.co.uk
Messages sorted by:
Reverse Date,
Date,
Thread,
Author