Closed Bug 242953 Opened 18 years ago Closed 17 years ago

an Imported eudora attached file is always named "Attached File" instead of its real name

Categories

(MailNews Core :: Import, defect)

x86
Windows XP
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8beta1

People

(Reporter: y.rouillard, Assigned: mscott)

Details

(Whiteboard: fixed-aviary1.0)

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.6) Gecko/20040206 Firefox/0.8
Build Identifier: Mozilla Thunderbird version 0.6 (20040502)

I recently try to import some eudora mail and in all mail with an attachment,
the attached file is simply named "Attached File" instead of its original name,
which is a bit annoying to know what was this file about.

Reproducible: Always
Steps to Reproduce:
1. Receive an mail with an attached file named "toto.txt" in Eudora 
2. Import it in Thunderbird
3. Open the imported mail
Actual Results:  
A mail with an attached file named "Attached File"

Expected Results:  
A mail with an attached file named "toto.txt"
This patch worked for me but since I am not used to the mozilla code, I am not
sure it is a clean solution for this problem.
Comment on attachment 147912 [details] [diff] [review]
Gives its real name to an eudora imported attached file.

I don't see this being used:
+	nsCString description;

I think you can change this:
+	a->description = nsCRT::strdup( PromiseFlatCString(realFileName).get()
) );

to 

a->description = nsCRT::strdup( PromiseFlatCString(Substring(current,
end)).get() ) );

and get rid of the local var realFileName.
Thanks for your comment.

You're right for the first line, a vestige from the first version !

I will make your modifications and will submit the new patch as soon as I get
back a computer with windows.

Do you thinks these patch could be merged in the main trunk ? The society where
I work is planning to move from Eudora to Thunderbird, but import problems are
blocking points.

Attachment #147912 - Attachment is obsolete: true
I am wondering, if this bug is related or even the same as bug 228149. Anyhow, I
just had the same problem. Confirming.

Please ask for review and superreview for your patch.

pi
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → mscott
Comment on attachment 148287 [details] [diff] [review]
Set the real name to an eudora imported attached file.

Yann, 

is the fileName argument that gets passed into AddAttachment already just the
filename or is it really a full path? 

If it is just the file name, then we can use that diirectly without iterating
over the string right?

If it is a full path, we should really take the path, turn it into a nsIFile
then ask the file to give us the leaf name instead of trying to walk the path
and figuring it out on our own.
Attachment #148287 - Flags: superreview-
Attachment #148287 - Attachment is obsolete: true
Comment on attachment 153467 [details] [diff] [review]
set the attachment name as the leaf name of the file

I've given up on trying to get the whitespace to work in these import files.
They were all written with tabs.
Attachment #153467 - Flags: superreview?(bienvenu)
Attachment #153467 - Flags: superreview?(bienvenu) → superreview+
fixed on the 1.0 branch and the trunk.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: fixed-aviary1.0
Target Milestone: --- → mozilla1.8beta
I can verify this fix works on Mozilla 2004-07-17 Win32 trunk nightly build.
thanks for helping me test this. Can you also verify 3157 as well which was the
other big eudora importing issue? 
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.