Stop truncating filenames in file:/// directory listings




10 years ago
a year ago


(Reporter: bugmail-mozilla, Unassigned)


Firefox Tracking Flags

(Not tracked)


(Whiteboard: [necko-would-take])


(1 attachment)



10 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fr; rv: Gecko/2008111317 Ubuntu/8.04 (hardy) Firefox/3.0.4
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081122 Minefield/3.1b2pre

When listing a directory through file:/// protocol, very long filenames (>= ~90 characters approximately on Windows, >= 73 on Linux) are truncated and a central part of the filename is replaced with an ellipsis ("…").

This doesn't make sense as filenames are split on several lines if necessary.

Reproducible: Always

Steps to Reproduce:
1. create a file with a very long filename  (>= 73 or 90 characters)

e.g: "this is a very long filename, too long actually to be displayed on one single line.txt"

2. open the containing directory with "file:///"
Actual Results:  
The filename is internally truncated by "…" AND split on 2 lines.

Expected Results:  
The filename is displayed completely, split on 2 lines (OR the filename is truncated and fits exactly on 1 single line).

Reproduced with Firefox 3.0.4 on Windows XP, and Firefox 3.0.4 and latest trunk nightly on Ubuntu Linux (8.04)

- sometimes you can see that only 1 character is replaced by "…" (difficult to reproduce)

- the length of truncated filenames can change.
- the number of characters necessary to see a truncation seems quite different on different platforms: about 85 on Windows, 73 on Linux.

I think it it somewhat similar to bug 449925 but it is not specific to filenames containing "…". (see proposed filename in Step 1 that doesn't contain any "…").

Alternatively "…" could be made useful by really adapting the length of the filename to fit exactly on the available space, but I think this would be far more complicated.

Comment 1

10 years ago
Created attachment 349585 [details]
Screenshot of the 1) bug 2) the filenames as display by nautilus

I captured a folder containing 2 empty files with long names.

Top: as shown by Firefox in file:/// networking
The first file is truncated with "…" AND split on two lines
The second one is also truncated but the rendered length is different (therefore it is not split).

Bottom: for comparison purposes, the full filenames as displayed by Nautilus are shown below

Comment 2

10 years ago
The combination of wrapping with truncation is definitely weird.

Dao has been playing with this in bug 392718 and bug 393681.
Component: General → Networking
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → networking
Summary: Remove filename truncation ellipsis ("…") in file:/// directory listing → Stop truncating filenames in file:/// directory listings
Whiteboard: [necko-would-take]
You need to log in before you can comment on or make changes to this bug.