Re: [PATCH] Do _not_ call unlink on a directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 16 Jul 2007, Thomas Glanzmann wrote:
> 
> > so I think this patch is the best that can be done.
> 
> is there a reason why we call unlink and not remove?

Exactly because we only want to remove _files_.

If it's already a directory, we don't need to do anything at all (we just 
want to go to the next path component).

So what git wants is the modern "unlink()" behaviour that will return 
EPERM (oe EISDIR) for a directory. 

Not doing that in this day and age is *insane*. That whole "unlink/link" 
on directories is original UNIX, but it's original UNIX from several 
decades ago. It got fixed long long ago, and mkdir/rmdir have existed as 
system calls since at least SVR3. Nobody does the insane "unlink()" any 
more.

Except in Solaris, it would appear.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux