Index: src/doc.c ================================================================== --- src/doc.c +++ src/doc.c @@ -378,11 +378,11 @@ ** ** The file extension is used to decide how to render the file. */ void doc_page(void){ const char *zName; /* Argument to the /doc page */ - const char *zOrigName; /* Original document name */ + const char *zOrigName = 0; /* Original document name */ const char *zMime; /* Document MIME type */ char *zCheckin; /* The checkin holding the document */ int vid = 0; /* Artifact of checkin */ int rid = 0; /* Artifact of file */ int i; /* Loop counter */ @@ -523,11 +523,11 @@ /* Jump here when unable to locate the document */ doc_not_found: db_end_transaction(0); cgi_set_status(404, "Not Found"); style_header("Not Found"); - @

Document %h(zOrigName) not found + @

Document %h(zOrigName ? zOrigName : zName) not found if( fossil_strcmp(zCheckin,"ckout")!=0 ){ @ in %z(href("%R/tree?ci=%T",zCheckin))%h(zCheckin) } style_footer(); return;