dummzeuch 1505 Posted March 24, 2020 I just got a very odd error message from a TJvSaveDialog: M.A1R.SigBrightness_2020-03-25 The filename is not valid. As you can see in the screenshot, there are already several files with the same name scheme in that directory: The dialog seems to come from the Windows Dialog itself, at least the call stack doesn't show any JVCL or RTL code after the call to Execute. I admit that the file name is a bit unconventional, but it should still be valid. If I save the file as e.g. 'bla.dat' I can later on simply rename it to the name I originally intended. Also, if the file already exists and I simply select it, I get an overwrite prompt and then can save the file. To be sure that there are'nt any invisible characters there, I type the whole thing. The error occurs anyway. I also tried different directories, on the server and on a local drive, even in the root of drive d:. No difference. WTF is going on here? Share this post Link to post
dummzeuch 1505 Posted March 24, 2020 OK, found it: The problem was not the file name but the filter (Save as type): If I change it to *.* it works. Seems that Windows for whatever reason doesn't like the filter to contain a * at the end of the extension (in my case "*.SigBrightness*". If I switch to the filter "*.SigBrightness" (without the trailing *), Windows appends ".SigBrightness" to the file name, which I can then manually remove and save the file with the intended name. Now, how do I get Windows to show the selection I want but still let me save the file? 1 Share this post Link to post