Re: [PATCH] opening files in remote.c should ensure it is opening a file
- From
Brandon Casey <casey@nrlssc.navy.mil>
- Date
- Feb 8, 2008, 21:14 UTC
- Message-ID
- <47ACC64E.7040102@nrlssc.navy.mil>
- In-Reply-To
- <47ACC261.6060404@nrlssc.navy.mil>
Brandon Casey wrote:
Show 8 quoted lines
> Junio C Hamano wrote:
>
>> And have Makefile set FOPEN_OPENS_DIRECTORIES on appropriate
>> platforms.
>
> Which ones _don't_ open directories?
>
> Shouldn't fopen("path_to_some_directory", "r") work?Ok. It's the FOPEN_OPENS_DIRECTORIES term that confused me.
fopen is expected to succeed, even on directories. It's the read that should fail but is not on HPUX. Obviously we don't want to change the read.
-brandon