#1844 trailing dots '...' ignored in filenames

obsolete: 8.3.4
closed-fixed
Vince Darley
5
2003-09-16
2002-04-10
Vince Darley
No

Trailing dots in filenames are stripped off. I'm
assuming this is not a bug in Tcl (since I know the
filesystem code pretty well, and this occurs in both
8.3 and 8.4), so I think it's a bug in the filename.n
man page, which doesn't mention this "feature" at all.

[my comments below have been added like this]

% set fn "C:/WINNT/Profiles/VinceD/Alpha-
v8/tmp/wikitmp/Edit Ask, and it shall be given."
C:/WINNT/Profiles/VinceD/Alpha-v8/tmp/wikitmp/Edit
Ask, and it shall be given.
% file attributes $fn -longname
C:/WINNT/Profiles/VinceD/Alpha-v8/tmp/wikitmp/Edit
Ask, and it shall be given
[the longname is missing the trailing '.']
% file attributes $fn -shortname
C:/WINNT/Profiles/VinceD/Alpha-v8/tmp/wikitmp/EDITAS~1
% cd [file dirname $fn]
% glob *
{Edit Ask, and it shall be given}
[oh! the file on disk actually doesn't have the dot]
% file exists $fn
1
% file exists $fn.
1
% file exists $fn....
1
% file exists $fn.......
1
% info tclversion
8.3
% file exists $fn.......x
0
% file exists $fn........
1
% close [open $fn.... r]
% close [open "${fn}dup....." w]
% glob *
{Edit Ask, and it shall be given} {Edit Ask, and it
shall be given.dup}
%

Discussion

  • Vince Darley
    Vince Darley
    2003-09-15

    • assigned_to: hobbs --> vincentdarley
     
  • Vince Darley
    Vince Darley
    2003-09-15

    Logged In: YES
    user_id=32170

    We just need to update filename.n to reflect the fact that
    such dots are ignored. 'file normalize' already removes them.

    Assigning to myself to do when I have time.

     
  • Vince Darley
    Vince Darley
    2003-09-16

    • status: open --> closed
     
  • Vince Darley
    Vince Darley
    2003-09-16

    Logged In: YES
    user_id=32170

    Updated in docs in cvs, together with a test to illustrate
    MSFT's documented behaviour. As such the above behaviour is
    "correct".

     
  • Vince Darley
    Vince Darley
    2003-09-16

    • status: closed --> closed-fixed