As far as I know we never really handled files on different volumes, even if it (accidently ?) might have worked before.
If I see it correctly, th erelevant part of the patch is this one (just cosmetical changes on the other places) :
@@ -360,13 +362,17 @@ void cbProject::CalculateCommonTopLevelPath()
ProjectFile* f = (*it);
if (!f)
continue;
wxString fileName = f->file.GetFullPath();
- f->relativeToCommonTopLevelPath = fileName.Right(fileName.Length() - m_CommonTopLevelPath.Length());
+ if ( f->file.GetVolume().IsSameAs(base.GetVolume()) )
+ f->relativeToCommonTopLevelPath = fileName.Right(fileName.Length() - m_CommonTopLevelPath.Length());
+ else
+ f->relativeToCommonTopLevelPath = fileName;
+
f->SetObjName(f->relativeToCommonTopLevelPath);
}
}
wxString cbProject::GetCommonTopLevelPath() const
{
Wouldn't it be better to handle the different volume issue when calculating
m_CommonTopLevelPath and not (only) when setting the
relativeToCommonTopLevelPath for the files belonging to the project.
If the files are on different volumes
m_CommonTopLevelPath is just empty and all files have to use absolut paths as
relativeToCommonTopLevelPath.
By the way, I explicitely wrote, that I did not test it with files on different volumes:
Can you (and other devs) please test the attached patch ?
I did not test what happens, if files in a project are on different drives in windows.