SaveDialog issue where path contains '.'

In windows:

Using SaveDialog
With a filter that includes a default extension of (say) .extension

The chosen filename is in a path which contains a ‘.’


…and the user enters a filename WITHOUT an extension, say ‘Banana’

What is returned is something like C:/My documents/.extension
The entered file name part is discarded, and the default extension is added.

If they enter a filename WITH an extension , eg Banana.extension
then it works properly…

I know . is a problem on Macs, but why would this be a problem on Windows?

It works ok for me, can you make a quick video showing it happen? Maybe I’m doing something different to you.

Dim t As New FileType = "Text Documents"
t.Extensions = ".txt"

Dim f As FolderItem
f = FolderItem.ShowSaveFileDialog(t, "text.txt")

I typed in hello with no extension typed in it the path is


which is what I would expect it to do, add the .txt

I setup a custom SaveFileDialog, in case there’s a difference from ShowSaveFileDialog as Julian used. And I tried having the .whatever folder at the beginning, middle and end fo the path. But all attempts worked correctly as expected.

I agree with Julian, you must be doing something else that you didn’t include in your description.

P.S. A period is not a problem on Macs. It’s just if the file or folder begins with a period then the file or folder is hidden. No different than setting the Hidden attribute on Windows.

Only hidden in the Finder. Still visible in Terminal.

You can toggle the revealing of hidden items in Finder by pressing Cmd-Shift-period

And in file dialogs, too.