At that moment I cannot reproduce that, but I found two strange point in cbp:
1. In list of the virtual folders:
<Option virtualFolders="main/;static/" />
typical in projects it looks like
<Option virtualFolders="main/;static/;" />
2. and Extensions:
while it must be at least:
<Extensions>
<code_completion />
<envvars />
<debugger />
</Extensions>
No other deviations was found so far.
When I tried to make "Save As" for this project, I got all source files with full path, and mentioned above deviations was reproduced as well even if they were corrected manually.
Does this only happen if you use the new file wizard,
Yes. I dont use "empty file" option, and I dont remember problems with adding already existed files.
Can you confirm, that all files are children of the project folder?
Yes. But looks like that issue appeared after I added already existed files from child folder to project. I added 2 files from sub-folder, then I opened wizard, it proposed to create new file inside this sub-folder (it is actually "rtb" folder in project tree), not in the project root. And then it started...
Do the failing files have absolute paths with upper or lower case drive letters?
It is it: <Unit filename="C:/mingw/projects/fltk_kikus_v0/dddd.cpp" />
In fresh new project, which is OK, "C" is big (see attach).
Make a copy of the project file and replace the drive letter with the other case. Does the problem goes away?
Strange, but Yes! I did it, opened it in C::B. If I open and then "Save" project with corrected "c", I got normal record <Unit filename="dddd.cpp" />
.
However, when I made "Save As" for this corrected project, all file records in cbp became absolute:
<Unit filename="c:/mingw/projects/fltk_kikus_v0/main.cpp">
<Option virtualFolder="main/" />
Have you added the path by copy and paste?
No. I have no idea why it appeared.
Just in case: I`m using Polish Win10. But for sure there are no non-ascii letters in path, etc.
I think i have found the problem on the loading side:
in sdk\cbproject.cpp:870
#ifdef __WXMSW__
// for Windows, make sure the filename is not on another drive...
if ( (local_filename.Length() > 1)
&& (local_filename.GetChar(1) == _T(':'))
&& (fname.GetVolume() != wxFileName(m_Filename).GetVolume()) )
// (this is a quick test to avoid the costly wxFileName ctor below)
{
fname.Assign(filename);
}
we check if the drive letters are different. As far as i can find drive letters are case insensitive on windows. So we should use a case insensitive comparison here...
#ifdef __WXMSW__
// for Windows, make sure the filename is not on another drive...
if ( (local_filename.Length() > 1)
&& (local_filename.GetChar(1) == _T(':'))
&& !(fname.GetVolume().IsSameAs(wxFileName(m_Filename).GetVolume(), false)) )
// (this is a quick test to avoid the costly wxFileName ctor below)
{
fname.Assign(filename);
}
else if (fname.GetFullPath().StartsWith(_T("\\\\"))) // UNC path
{
fname.Assign(filename);
}
else
#endif
I have not searched on the file creation site, because i can not reproduce it...