Author Topic: ProjectFile::Rename behaviour  (Read 4472 times)

Offline dushara

  • Multiple posting newcomer
  • *
  • Posts: 29
ProjectFile::Rename behaviour
« on: March 11, 2011, 11:24:50 am »
Hi I've got a question about how ProjectFile::Rename behaves.

Code: [Select]
/*virtual*/ void VcsFileItem::Rename(const wxString& newName)
    cbProject* prj = m_PrjFile->GetParentProject();
    wxString topLevel = prj->GetCommonTopLevelPath();

    Manager::Get()->GetLogManager()->Log( m_PrjFile->file.GetFullPath() );
    Manager::Get()->GetLogManager()->Log( newName );
    Manager::Get()->GetLogManager()->Log( topLevel );

    wxString newRelativeName = StripRootPath(topLevel, newName).AfterFirst('/');
    Manager::Get()->GetLogManager()->Log( newRelativeName );

The log output:

Code: [Select]

The problem is, it appears in the project hierarchy as:

As you can see the result of a file rename Vs directory + file rename are different.

How should directory renames be handled?

I'm using the svn build rev 7015 for Linux.