Closed Bug 21873 Opened 25 years ago Closed 25 years ago

blank file name in download dialog causes crash

Categories

(SeaMonkey :: General, defect, P1)

x86
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: tever, Assigned: pavlov)

References

()

Details

Overview Description:  I am seeing a crash when I do not supply
a filename for ftp download.  (In Linux only)

Steps to Reproduce:
1.)  Go to ftp://sweetlou or some ftp site
2.)  select a file to download and select save in your download dialog
3.)  In the 'Save File' dialog do not supply a file name and select OK
4.)  the 'Replace' dialog will display "Replace file ""?"   Select replace.

Actual Results:  Program terminates

Expected Results:  I would expect some sort of error handling message.

Build Date & Platform Bug Found:
1999121508  Linux
QA Contact: leger → tever
re-assigning QA contact to myself
Severity: normal → critical
Priority: P3 → P1
Target Milestone: M13
Move to M13.
Status: NEW → ASSIGNED
OS: Windows NT → Linux
Probably the file widget code is different on Linux.  We'll have to either
handle that in nsIFileWidget or deal with it in the stream xfer code.
cc:ing sairuh, this probably is under her QA realm
Is this related to bug #23885 (Bad crash when opening nonexistant file)?
Probably not related.  This one seems specific to linux, that other one seems
present on windows, also.
Assignee: law → pavlov
Status: ASSIGNED → NEW
pavlov and I discussed this bug.  I've got the following patch (which treats

entry of a blank file name (directory path) the same as cancel) but I'm turning

it over to him.



Index: nsFileWidget.cpp

===================================================================

RCS file:

/cvsroot/mozilla/widget/src/gtk/nsFileWidget.cpp,v

retrieving revision 1.35

diff

-r1.35 nsFileWidget.cpp

418c418,423

<     if( theFileSpec.Exists() )

---

>

if( theFileSpec.IsDirectory() )

>     {

>       // Can't put to a directory.

>

    theResult = nsFileDlgResults_Cancel;

>     }

>     else if(

theFileSpec.Exists() )
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
checked in fix
verified Linux 2000012401
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.