From: Brandon Casey Date: Fri, 08 Feb 2008 20:58:09 GMT Subject: Re: [PATCH] opening files in remote.c should ensure it is opening a file Message-ID: <47ACC261.6060404@nrlssc.navy.mil> In-Reply-To: <7v8x1vjiic.fsf@gitster.siamese.dyndns.org> 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? -brandon #include int main(int argc, char* argv[]) { if (!fopen(argv[1], "r")) { perror("File open failed"); return 1; } puts("File open succeeded."); return 0; }