In this code:
wxString globalFilename( "TIA_Designer_Design_Data" );
wxFileName fname( wxTheApp->argv[0] );
wxString DataFileStr = fname.GetPath(wxPATH_GET_VOLUME|wxPATH_GET_SEPARATOR) + globalFilename;
m_DataFile = new wxFileConfig( "", "", DataFileStr );
I expected DataFileStr to have a filepath to the same directory the application is running in, and a filename of "TIA_Designer_Design_Data". This then is the path I expected:
C:\Engineering Software\TIA Designer\bin\Debug\TIA_Designer_Design_Data
What I got instead was this:
C:\ENGINE~1\TIADES~2\bin\Debug\TIA_Designer_Design_Data
There is no sign the wxConfigFile object created a file anywhere on hard drive C. Why are the first two directories in the path other than "Engineering Software\TIA Designer"? Why are these directory names being truncated, capitalized, and tilde characters followed by a number appended? Is it because there are spaces in the directory names?