Installation of microsummary with long name (attribute) fails

RESOLVED FIXED in Firefox 2 beta2

Status

Firefox Graveyard
Microsummaries
P1
normal
RESOLVED FIXED
12 years ago
2 years ago

People

(Reporter: Adam Guthrie, Assigned: Joey Minta)

Tracking

({fixed1.8.1, testcase})

2.0 Branch
Firefox 2 beta2
x86
Linux
fixed1.8.1, testcase
Bug Flags:
blocking-firefox2 +

Details

(URL)

Attachments

(3 attachments)

(Reporter)

Description

12 years ago
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1a3) Gecko/20060620 BonEcho/2.0a3

Steps to reproduce:
1. Open testcase.
2. Click the Install microsummary generator link.

Results:
No generator installed.

Expected results:
Microsummary generator should be installed.

I get this error in the Error Console:
Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIFile.createUnique]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///[snip]/components/nsMicrosummaryService.js :: anonymous :: line 381"  data: no]
Source File: file:///[snip]/components/nsMicrosummaryService.js
Line: 381

I think the best thing to do would be to just fix sanitizeName to truncate the name.
(Reporter)

Comment 1

12 years ago
Created attachment 226404 [details]
microsummary generator
(Reporter)

Comment 2

12 years ago
Created attachment 226405 [details]
testcase
(Reporter)

Updated

12 years ago
Keywords: testcase
Priority: -- → P1
Whiteboard: [myk-mss]
Target Milestone: --- → Firefox 2 beta2
Component: Bookmarks → Microsummaries
Flags: blocking-firefox2?
Whiteboard: [myk-mss]

Updated

12 years ago
Flags: blocking-firefox2? → blocking-firefox2+

Updated

12 years ago
Whiteboard: [at risk]
(Assignee)

Comment 3

12 years ago
Created attachment 229852 [details] [diff] [review]
truncate at 60

I really don't have a good feel for where we should truncate these names, but my theory was 60 + createUnique can generally stay under 64, which is a nice magic number in the computer world.  I'm open to suggestions for better values though.
Assignee: nobody → jminta
Status: NEW → ASSIGNED
Attachment #229852 - Flags: review?
(Assignee)

Updated

12 years ago
Attachment #229852 - Flags: review? → review?(myk)
Comment on attachment 229852 [details] [diff] [review]
truncate at 60

Note that all three tier 1 platforms support filenames up to 255 characters long, although for Windows the entire path must fit within that limit, according to the following page.

http://linuxboxadmin.com/articles/filefriction.php

Given the funky Windows behavior, a 64 character limit seems reasonable.

Patch looks good, works well. r=myk

Thanks for the fix!
Attachment #229852 - Flags: review?(myk) → review+
Checked in to the trunk.
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Comment on attachment 229852 [details] [diff] [review]
truncate at 60

Notes for drivers considering this approval request:

This fixes an edge case in which we fail to install microsummary generators.  The fix is trivial and presents a low risk of regressions.  It has been on the trunk since Thursday early morning.
Attachment #229852 - Flags: approval1.8.1?
Comment on attachment 229852 [details] [diff] [review]
truncate at 60

a=mconnor on behalf of drivers for checkin to the 1.8 branch
Attachment #229852 - Flags: approval1.8.1? → approval1.8.1+
Keywords: fixed1.8.1
Whiteboard: [at risk]
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.