[Lazarus] Saving namespace files on WinXP

Bart bartjunk64 at gmail.com
Sat Jan 28 00:02:22 CET 2017


On 1/27/17, Bart <bartjunk64 at gmail.com> wrote:

> IIRC there is a difference between XP and newer Windows wrt to
> handling of default extension in savedialog.

On Win7 in File Save As dialog:

type foo -> filename = foo.pas (or foo.pp)
type foo.bar -> filename = foo.bar.pas
type foo.doc -> filename = foo.doc
type foo.txt -> filename = foo.txt

It seems like Windows checks if the extension is a registered type,
and if so does not apply the default extension.

If I run a sample program with a TSaveDialog it's the same.
If I run this in XP-compatibility mode the behaviour is different:
if the filename has an extension then then default extension is never applied,
so:
foo -> foo.pas
foo.bar -> foo.bar
foo.doc -> foo.doc

Bart


More information about the Lazarus mailing list