Allow deleting and renaming stale symlinks and

deleting symlinks pointing to directories.

PR:		bin/37250
Submitted by:	Nino Dehne <TeCeEm@gmx.de>
MFC after:	1 week
This commit is contained in:
Yaroslav Tykhiy 2002-07-21 12:06:56 +00:00
parent 1b64ed3b5b
commit 1b0e12d747
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=100439

View File

@ -2271,7 +2271,7 @@ delete(char *name)
struct stat st;
LOGCMD("delete", name);
if (stat(name, &st) < 0) {
if (lstat(name, &st) < 0) {
perror_reply(550, name);
return;
}
@ -2340,7 +2340,7 @@ renamefrom(char *name)
{
struct stat st;
if (stat(name, &st) < 0) {
if (lstat(name, &st) < 0) {
perror_reply(550, name);
return ((char *)0);
}