FIX: Extra periods in filname changed to underscores

VERIFIED FIXED

Status

MozillaClassic
Windows FE
P3
minor
VERIFIED FIXED
20 years ago
15 years ago

People

(Reporter: Brian Wiles, Assigned: Garrett Arch Blythe)

Tracking

1998-03-31
x86
Windows NT

Details

(Reporter)

Description

20 years ago
Created by Brian Wiles (brian@inforum.net) on Sunday, April 19, 1998 3:06:03 PM PDT
Additional Details :
I wrote my own fix to not change extra periods to
underscores when downloading a file.  Feel free to
incorporate this into your version of Mozilla.  Forgive me
if this has been addressed previously.  I did not see it in
the Bugzilla query.

This is a context diff in function fe_URLtoLocalName in
ns\cmd\winfe\fenet.cpp:

*** c:\temp\fenet.cpp   Mon Mar 30 17:57:42 1998
--- fenet.cpp   Sun Apr 19 14:45:30 1998
***************
*** 268,277 ****
  #endif
      char *name = csName.GetBuffer(0);

!     // replace extra periods in 8 character name with
underscores
      for (idx =0 ; idx < csName.GetLength(); idx++) {
          if ((name[idx] == '.')||(name[idx] == ':'))
name[idx] = '_';
      }
      csName.ReleaseBuffer(-1);

      *csURL = csName + csExt;
--- 268,285 ----
  #endif
      char *name = csName.GetBuffer(0);

! #ifdef XP_WIN16
!     // replace extra periods and colons in 8 character
name with underscores

      for (idx =0 ; idx < csName.GetLength(); idx++) {
          if ((name[idx] == '.')||(name[idx] == ':'))
name[idx] = '_';
      }
+ #else
+     // replace extra colons in 8 character name with
underscores
+     // This fixes the filename mangling problem in Win32
since it can handle multiple periods. -BCW 04/01/1998
+     for (idx =0 ; idx < csName.GetLength(); idx++) {
+         if (name[idx] == ':') name[idx] = '_';
+     }
+ #endif
      csName.ReleaseBuffer(-1);

      *csURL = csName + csExt;
Updated by Garrett Arch Blythe (blythe@netscape.com) on Thursday, June 11, 1998 4:24:09 PM PDT
Additional Details :
Checked a modified fix into Mozilla tree.  Thanks Brian!
mid-air collision ? / bugzilla cleanup
Reopening (current State: resolved and no resolution)
Status: RESOLVED → REOPENED
fixed
Status: REOPENED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
*** Bug 257 has been marked as a duplicate of this bug. ***

Comment 4

15 years ago
VERIFIED due to no changes in over a year
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.