Closed Bug 22336 Opened 26 years ago Closed 25 years ago

[PP]nsIFileSpecWithUI::ChooseFile()let user select a directory

Categories

(MailNews Core :: Composition, defect, P3)

x86
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: rzach, Assigned: pavlov)

Details

When no file name is entered in the attachment selection dialog, the entire directory is attached. On send, an error message [StringID(hex)=fffffff?] is displayed. To reproduce: 1. Compose message 2. Click on Attach 3. Click OK in attachment dialog: current directory path is added to attachment list 4. Click send Actual result: a window with "[StringID(hex)=fffffff?]" is displayed; clicking ok displays it again; then send fails. Expected results: A meaningful error; or an error message when I try to attach an entire directory in the first place. Linux build 1999.12.20.12 Console output: SendMessage from XUL GenericSendMessage from XUL Identity = [nsIMsgIdentity: id1] attachments = file:///usr/local/mozilla/nightly/package/ WEBSHELL+ = 11 nsXULKeyListenerImpl::Init() WEBSHELL+ = 12 commonDialogOnLoad WEBSHELL- = 11 Move window by 65,96 screen x 0screen y 0 145512240 : Focus occurred on: Window with a XUL doc (happens twice) 145512240 : Focus occurred on: A Focusable DOM Element WEBSHELL- = 10 142339152 : Focus occurred on: Window with an HTML doc (happens twice) 142339152 : Focus occurred on: Window with an HTML doc (happens twice) WEBSHELL+ = 11 nsXULKeyListenerImpl::Init() WEBSHELL+ = 12 commonDialogOnLoad WEBSHELL- = 11 Move window by 65,96 screen x 0screen y 0 145403488 : Focus occurred on: Window with a XUL doc (happens twice) 145403488 : Focus occurred on: A Focusable DOM Element WEBSHELL- = 10 failed to SendMsg
QA Contact: lchiang → pmock
Good catch.
Status: NEW → ASSIGNED
Target Milestone: M14
Seems like you can't attach a directory in 4.x, at least not in the WinFE. For beta1, it would be good to either (1) prevent the user from attaching a directory, or (2) make the send operation not fail. Either would do. cc'ing rhp too.
Mac and Window UI don't let attach a directory. We need to prevent that on Unix as well.
Summary: Attach directory: weird error, fail to send message → [PP]Attach directory: weird error, fail to send message
In fact, if this still append, it's a bug in nsIFileSpecWithUI::ChooseFile(). QA, do you mind check if you still able to choose a directory when you attach a file. Thanks
fenella - can you try as jfd suggests? Thanks!
QA Contact: pmock → fenella
Linux build 2000.03.08.09: I no loger get an error, and the message is sent. But I can still attach a directory; it is silently ignored.
Thanks Richard. I now need to find the owner of nsIFileSpecWithUI::ChooseFile()on Unix to reassign this bug to himself.
Looks like pavlov would be the right person. Update summary to reflect the real problem. We need also to check if this problem also occurs to other Unix flavors.
Assignee: ducarroz → pavlov
Status: ASSIGNED → NEW
Summary: [PP]Attach directory: weird error, fail to send message → [PP]nsIFileSpecWithUI::ChooseFile()let user select a directory
Target Milestone: M14 → M16
marking fixed... this is fixed for people using the new filepicker interface. nsIFileSpecWithUI is going away and should not be used.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
..and what's the new one?
nsIFilePicker. I will be landing stuff to most places using nsIFileSpecWithUI whenever the tree opens
Developer, please advise me how to verify this bug?
fenella - did you try the original steps of not choosing a file in the dialog?
I forgot to mention that using the Linux (2000-04-13-11 M15) build to try the original steps, it sends out the mail. It does not attach the path, instead, it defaults to attach an empty file called attachment.txt. >In fact, if this still append, it's a bug in nsIFileSpecWithUI::ChooseFile(). Ducarroz, does this mean if it does not, the bug is fixed. Please advise.
Linux (2000-04-19-08 M16) When I attachment a directory, the message was sent and in the received message, the attachment is called attachment.txt. This file has 0 bit. When I click on the attachment button, and click OK, the received message also attached a default file attachment.txt, which is also zero bits. I am marking this verified since I do not see the problem scenario as described in the original report.
Status: RESOLVED → VERIFIED
Are you telling me that if you select a directory, we send an attachment named attachment.txt? If it's the case, we still have a problem!
Yes. Whether I leave it empty or attach a directory, it sends out as attachment.txt. But this file is empty though. Should I open a separate but<
yes please, and assign it to me. Thanks
Fenella, Could you put me as the QA assigned for this new bug? I see the problem you described in todays linux build. Thanks /Pete
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.