Re: [PATCH] opening files in remote.c should ensure it is opening a file

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: Morten Welinder <mwelinder@...>, H.Merijn Brand <h.m.brand@...>, <git@...>
Date: Friday, February 8, 2008 - 4:58 pm

Junio C Hamano wrote:


Which ones _don't_ open directories?

Shouldn't fopen("path_to_some_directory", "r") work?

-brandon

#include <stdio.h>

int main(int argc, char* argv[])
{
    if (!fopen(argv[1], "r")) {
        perror("File open failed");
        return 1;
    }

    puts("File open succeeded.");

    return 0;
}

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] opening files in remote.c should ensure it is op..., Brandon Casey, (Fri Feb 8, 4:58 pm)
Re: [PATCH] opening files in remote.c should ensure it is op..., Johannes Schindelin, (Fri Feb 8, 4:40 pm)
Re: [PATCH] opening files in remote.c should ensure it is op..., Johannes Schindelin, (Fri Feb 8, 5:47 pm)
Re: [PATCH] opening files in remote.c should ensure it is op..., Johannes Schindelin, (Fri Feb 8, 4:38 pm)
Re: [PATCH] opening files in remote.c should ensure it is op..., Johannes Schindelin, (Fri Feb 8, 4:44 pm)