zsh-workers
 help / color / mirror / code / Atom feed
* zsh/files.so: `mkdir -p' fails on symlinks
@ 2005-07-15  6:59 Alexey Tourbin
  2005-07-15  7:15 ` Alexey Tourbin
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Tourbin @ 2005-07-15  6:59 UTC (permalink / raw)
  To: zsh-workers

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: zsh/files.so: `mkdir -p' fails on symlinks
  2005-07-15  6:59 zsh/files.so: `mkdir -p' fails on symlinks Alexey Tourbin
@ 2005-07-15  7:15 ` Alexey Tourbin
  0 siblings, 0 replies; 2+ messages in thread
From: Alexey Tourbin @ 2005-07-15  7:15 UTC (permalink / raw)
  To: zsh-workers

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

On Fri, Jul 15, 2005 at 10:59:56AM +0400, Alexey Tourbin wrote:
> I've got a bug report on built-in mkdir command:
> https://bugzilla.altlinux.org/show_bug.cgi?id=7368

Oops, it loos like I was late a bit. :)
I am sorry about it...

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-07-15  7:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-15  6:59 zsh/files.so: `mkdir -p' fails on symlinks Alexey Tourbin
2005-07-15  7:15 ` Alexey Tourbin

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).