File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -334,7 +334,7 @@ int cmd_main(int argc, const char **argv)
334
334
{
335
335
struct strbuf buffer = STRBUF_INIT ;
336
336
struct strbuf report_path = STRBUF_INIT ;
337
- int report ;
337
+ int report = -1 ;
338
338
time_t now = time (NULL );
339
339
char * option_output = NULL ;
340
340
char * option_suffix = "%F-%H%M" ;
@@ -396,11 +396,11 @@ int cmd_main(int argc, const char **argv)
396
396
get_alternates_summary (& buffer , nongit_ok );
397
397
398
398
/* fopen doesn't offer us an O_EXCL alternative, except with glibc. */
399
- report = open (report_path .buf , O_CREAT | O_EXCL | O_WRONLY );
399
+ report = open (report_path .buf , O_CREAT | O_EXCL | O_WRONLY , 0666 );
400
400
401
401
if (report < 0 ) {
402
402
UNLEAK (report_path );
403
- die ("couldn't open '%s' for writing" , report_path .buf );
403
+ die (_ ( "couldn't create a new file at '%s'" ) , report_path .buf );
404
404
}
405
405
406
406
strbuf_write_fd (& buffer , report );
You can’t perform that action at this time.
0 commit comments