directory.xul mishandles # and ; ascii chars in filename



18 years ago
3 months ago


(Reporter: jrgmorrison, Assigned: mozilla)


Firefox Tracking Flags

(Not tracked)



(1 attachment)



18 years ago
Overview Description: 
  The code to generated a file:/// listing mishandles the ascii characters
  # and ; in the following ways: 

  1) if # appears in the filename, the displayed name is blank

  2) if # is not the first character in the filename, a double-click brings
     up a file download dialog

  3) if ; appears in the filename, a recursive folder is placed in the listing
     (e.g. if you open the folder, there is another set of folders representing
     the current directory with one folder for each file in the current      
     directory. Opening these folders, produces the same recursive structure).

  4) if ; is not at the beginning of the filename, then in addition to the      
     recursive folder, an additional set of files appear, with names equal to 
     'split(/;/, "foo;bar;baz")'

   This does not happen for an ftp:// listing.

Steps to Reproduce: 

1) on unix, do the following (and then move the contents to other filesystems 
   to test them).

   mkdir testdir; cd testdir
   touch \;foo\;
   touch semi\;foo\;semi
   touch \#foo\#
   touch hash\#foo\#hash

Actual Results: as stated above

Expected Results: treated like a normal file (; and # are legal on
                   mac, linux and win32 [correction welcome])

Build Date & Platform Bug Found: 
   2000090308 win32/mac/linux

Additional Information: 

   I noticed this while testing another bug. I use emacs, so I build up some
   files that use # at the start of the filename (emacs backup files from an
   aborted session). I noticed that the filenames for these files in the 
   listing were blank. So, I then tried all valid ascii punctuation (minus
   : < > ? | " \ / * which are not valid on windows (and some of those on
   mac ??)).

   I only had problems with # and ; on any platform

   This is in addition to the issue that the datasource does not display 
   filenames that begin with '.'

   If this gets futured, I won't cry ... I promise.

Comment 1

18 years ago
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 2

18 years ago
Works for Me
Platform: PC
OS: Windows 98
Mozilla Version: 2000100508

Marking as Verified

Comment 3

18 years ago
Created attachment 16303 [details]
zipfile of filenames with various leading and trailing punctuation characters

Comment 4

18 years ago
works on mac and linux too. Not sure if that .zip file is fully comprehensive,
but it's a fairly good test. Ideally, there would be platform specific ones that
use all the ascii puncuation that are defined as legal on each platform.


3 months ago
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.