]> Lady’s Gitweb - Gitweb/commit
gitweb: Always use three argument form of open
authorJakub Narebski <redacted>
Sun, 10 May 2009 00:38:34 +0000 (02:38 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:50:38 +0000 (00:50 -0400)
commit1da93012fc3f20038f04d13a1c2cf7918f09950898a80f2304d7f73fc570c928
treea714007495ed49ced1590a0982d90d27aa66652b2f62c9c8cc8e6537e802f62d
parent74043e29c6da3430abdef8d5ab279ad96a2000614c0489c39220e3eea82bd699
gitweb: Always use three argument form of open

In most cases (except insert_file() subroutine) we used old two argument
form of 'open' to open files for reading.  This can cause subtle bugs when
$projectroot or $projects_list file starts with mode characters ('>', '<',
'+<', '|', etc.) or with leading whitespace; and also when $projects_list
file or $mimetypes_file or ctags files end with trailing whitespace or '|'.

Additionally it is also more clear to explicitly state that we open those
files for reading.

Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl
This page took 0.147672 seconds and 4 git commands to generate.