Re: [PATCH] Do _not_ call unlink on a directory
- From
Brian Downing <bdowning@lavos.net>
- Date
- Jul 16, 2007, 17:42 UTC
- Message-ID
- <20070716174239.GG19073@lavos.net>
- In-Reply-To
- <11846075213759-git-send-email-sithglan@stud.uni-erlangen.de>
On Mon, Jul 16, 2007 at 07:38:41PM +0200, Thomas Glanzmann wrote:
> const char *slash = path; > + struct stat st;
> memcpy(buf, path, len); > buf[len] = 0; > + if (!stat(buf, &st) && S_ISDIR(st.st_mode)) > + continue; /* ok */
You've got some whitespace damage here. Git's style is to use tabs.
-bcd