Fixes a bug in the template file copying mechanism. The previous code failed to honour sub-directorys and flattened the whole tree whilst copying files.
I have fixed this so that sub-directories that are not the meta directory will get copied verbatim into the new project directory.
This commit is contained in:
parent
8c75adb8c1
commit
08f8703898
|
@ -139,7 +139,13 @@ bool PROJECT_TEMPLATE::CreateProject( wxFileName& aNewProjectPath )
|
|||
destname += wxT(".") + destination.GetExt();
|
||||
|
||||
wxString destpath = destination.GetPathWithSep();
|
||||
destpath.Replace( destination.GetPathWithSep(), aNewProjectPath.GetPathWithSep() );
|
||||
destpath.Replace( templateBasePath.GetPathWithSep(), aNewProjectPath.GetPathWithSep() );
|
||||
|
||||
// Check to see if the path already exists, if not attempt to create it here. Don't worry
|
||||
// about error checking, if the path isn't created the file copy will fail anyway
|
||||
|
||||
if( !wxFileName::DirExists( destpath ) )
|
||||
wxFileName::Mkdir( destpath, 0777, wxPATH_MKDIR_FULL );
|
||||
|
||||
destination = destpath + destname;
|
||||
dstFiles.push_back( destination );
|
||||
|
|
Loading…
Reference in New Issue