Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-05

Bug in FExpand (ver. 1.06 for Win32)

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Rich Pasco

Here's a bug in the FExpand procedure in the DOS unit of released version 1.06 for the Win32 platform:

Calling FExpand with a UNC path "poisons" it so that it fails with subsequent drive-letter based paths.

Here is my source code for "fexptest.pas":

  uses  DOS;
  procedure Expand(FileMask: string);
    begin
      WriteLn;
      WriteLn('Expanding "',FileMask,'"');
      FileMask := FExpand(FileMask);
      WriteLn('To become "',FileMask,'"');
    end;
  begin
    Expand('C:\out\music\Rock and Roll');
    Expand('\\pasco\shared\My Music\rock and roll');
    Expand('C:\out\music\Rock and Roll');
  end.

Here is the output, when running it with the current directory is "C:\test". Note that the first and third trials use the same input, but that the output is incorrect in the third trial.

C:\test>fexptest

Expanding "C:\out\music\Rock and Roll"
To become "C:\out\music\Rock and Roll"

Expanding "\\pasco\shared\My Music\rock and roll"
To become "\\pasco\shared\My Music\rock and roll"

Expanding "C:\out\music\Rock and Roll"
To become "C:\test\ock and Roll"

I hope this helps lead to a rapid resolution.

- Rich