Sign in Join

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

Mailing lists / fpc-devel / 2011-02

ExpandFilename bug?

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Joost van der Sluis

Hi all,

ExpandFileName('c:\pp') on windows returns the current directory. Is this 'as designed' or a bug? ('c:\pp' does exist)

Joost

Reply by email

Tomas Hajny
to Joost van der Sluis

On Wed, February 16, 2011 17:34, Joost van der Sluis wrote:

Hi Joost,

ExpandFileName('c:\pp') on windows returns the current directory. Is this 'as designed' or a bug? ('c:\pp' does exist)

I've just tried it and cannot reproduce it (2.4.2). I created 'pp' as both directory and a file, and it always returns 'C:\pp' (btw, the same results is returned if c:\pp does not exist which is also OK). I also tried different starting locations but that had no impact either. Did you try with a different version or can you provide more details?

Tomas

Reply by email

Tomas Hajny
to Mattias Gaertner
Mattias Gaertner wrote 10 lines
On Wed, 16 Feb 2011 17:34:01 +0100 Joost van der Sluis wrote: > Hi all, > > ExpandFileName('c:\pp') on windows returns the current directory. Is > this 'as designed' or a bug? ('c:\pp' does exist) This returns the current directory: ExpandFileName('')

Yes, this is the expected behaviour.

Tomas

Reply by email

Joost van der Sluis
to Tomas Hajny: I've just tried it and cannot reproduce it (2.4.2). I created 'pp' as both directory and…
Tomas Hajny wrote 13 lines
On Wed, February 16, 2011 17:34, Joost van der Sluis wrote: Hi Joost, > ExpandFileName('c:\pp') on windows returns the current directory. Is > this 'as designed' or a bug? ('c:\pp' does exist) I've just tried it and cannot reproduce it (2.4.2). I created 'pp' as both directory and a file, and it always returns 'C:\pp' (btw, the same results is returned if c:\pp does not exist which is also OK). I also tried different starting locations but that had no impact either. Did you try with a different version or can you provide more details?

I used 2.5.1.

Joost.

Reply by email

Joost van der Sluis
to Joost van der Sluis
Joost van der Sluis wrote 16 lines
On Wed, 2011-02-16 at 18:54 +0100, Tomas Hajny wrote: > On Wed, February 16, 2011 17:34, Joost van der Sluis wrote: > > > Hi Joost, > > > ExpandFileName('c:\pp') on windows returns the current directory. Is > > this 'as designed' or a bug? ('c:\pp' does exist) > > I've just tried it and cannot reproduce it (2.4.2). I created 'pp' as both > directory and a file, and it always returns 'C:\pp' (btw, the same results > is returned if c:\pp does not exist which is also OK). I also tried > different starting locations but that had no impact either. Did you try > with a different version or can you provide more details? I used 2.5.1.

Sorry, my fault.

Joost.

Reply by email