zsh-workers
 help / color / mirror / code / Atom feed
From: Alexey Tourbin <at@altlinux.ru>
To: zsh-workers@sunsite.dk
Subject: zsh/files.so: `mkdir -p' fails on symlinks
Date: Fri, 15 Jul 2005 10:59:56 +0400	[thread overview]
Message-ID: <20050715065955.GK3337@solemn.turbinal.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 827 bytes --]

Hello,

I've got a bug report on built-in mkdir command:
https://bugzilla.altlinux.org/show_bug.cgi?id=7368

$ mkdir dir
$ mkdir dir/subdir
$ ln -s dir dirp
$ zmodload zsh/files
$ which mkdir
mkdir: shell built-in command
$ mkdir -p dirp/subdir/subdir2
mkdir: cannot make directory `dirp': file exists
$ /bin/mkdir -p dirp/subdir/subdir2
$

Proposed fix is as follows:

--- zsh-4.3.0-20050712/Src/Modules/files.c-	2004-10-19 19:09:50 +0000
+++ zsh-4.3.0-20050712/Src/Modules/files.c	2005-07-15 06:55:52 +0000
@@ -127,7 +127,7 @@ domkdir(char *nam, char *path, mode_t mo
     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);
End of patch

-- 
Alexey Tourbin
ALT Linux Team

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2005-07-15  7:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-15  6:59 Alexey Tourbin [this message]
2005-07-15  7:15 ` Alexey Tourbin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050715065955.GK3337@solemn.turbinal.org \
    --to=at@altlinux.ru \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).