AddNote doesn't report errors if it can't write to notes.txt

RESOLVED FIXED

Status

Webtools Graveyard
Tinderbox
RESOLVED FIXED
15 years ago
4 years ago

People

(Reporter: timeless, Assigned: cls)

Tracking

Trunk
x86
Windows 2000

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.19 KB, patch
bear
: review+
Details | Diff | Splinter Review
(Reporter)

Description

15 years ago
MozillaTest had:
-rw-r--r--    1 nobody   nobody        117 Sep 21 10:00 notes.txt

egrep '^(User|Group) ' /etc/httpd/conf/httpd.conf
User apache
Group apache

Using addnote resulted in the normal your comment was added message. it should
have complained
(Reporter)

Comment 1

15 years ago
Created attachment 133928 [details] [diff] [review]
draft
(Reporter)

Comment 2

15 years ago
Comment on attachment 133928 [details] [diff] [review]
draft

can you test this?
Attachment #133928 - Flags: review?(justdave)
Comment on attachment 133928 [details] [diff] [review]
draft

doesn't compile.  Complains about || being overloaded.	Changing the test to:

$cant_print = 1 unless close NOTES;

Makes it work.

I still don't like the patch, but it works. :)	 I think it would be cleaner to
use a -w test before attempting to open it to begin with.
Attachment #133928 - Flags: review?(justdave) → review-
(Assignee)

Comment 4

12 years ago
Created attachment 224273 [details] [diff] [review]
v2.0
Attachment #133928 - Attachment is obsolete: true
Attachment #224273 - Flags: review?(bear)

Updated

12 years ago
Assignee: mcafee → cls

Comment 5

12 years ago
Comment on attachment 224273 [details] [diff] [review]
v2.0

I agree that this is not the best way to solve the issue.  Tinderbox2 writes each note to it's own file (named for the tree, build and time) and then html generation code pulls them in when it runs.
Attachment #224273 - Flags: review?(bear) → review+
(Assignee)

Comment 6

12 years ago
Checking the error result of the open() is functionality equivalent to the -w test.  Using separate files for each comment is beyond the (simple) scope of the bug and should be an enhancement request.

Checking in webtools/tinderbox/addnote.cgi;
/cvsroot/mozilla/webtools/tinderbox/addnote.cgi,v  <--  addnote.cgi
new revision: 1.17; previous revision: 1.16
done
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.