mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-02 07:03:50 +01:00
DirManager.cpp: remove old cruft comments and return an false on error
This commit is contained in:
@@ -1088,10 +1088,7 @@ bool DirManager::MoveToNewProjectDirectory(BlockFile *f)
|
|||||||
{
|
{
|
||||||
if(!wxRenameFile(f->GetFileName().GetFullPath(),
|
if(!wxRenameFile(f->GetFileName().GetFullPath(),
|
||||||
newFileName.GetFullPath()))
|
newFileName.GetFullPath()))
|
||||||
/*wxCopyFile(f->GetFileName().GetFullPath(), //vvvvv ANSWER-ME: In or out? Cruft?
|
|
||||||
newFileName.GetFullPath()))*/
|
|
||||||
return false;
|
return false;
|
||||||
//wxRemoveFile(f->GetFileName().GetFullPath()); //vvvvv ANSWER-ME: In or out? Cruft?
|
|
||||||
}
|
}
|
||||||
f->SetFileName(newFileName);
|
f->SetFileName(newFileName);
|
||||||
|
|
||||||
@@ -1112,6 +1109,8 @@ bool DirManager::MoveToNewProjectDirectory(BlockFile *f)
|
|||||||
newFileName.GetFullPath());
|
newFileName.GetFullPath());
|
||||||
if(ok)
|
if(ok)
|
||||||
wxRemoveFile(f->GetFileName().GetFullPath());
|
wxRemoveFile(f->GetFileName().GetFullPath());
|
||||||
|
else
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1165,28 +1164,12 @@ bool DirManager::CopyToNewProjectDirectory(BlockFile *f)
|
|||||||
{
|
{
|
||||||
bool ok = wxCopyFile(oldFileName.GetFullPath(),
|
bool ok = wxCopyFile(oldFileName.GetFullPath(),
|
||||||
newFileName.GetFullPath());
|
newFileName.GetFullPath());
|
||||||
//vvvvv ANSWER-ME: In or out? Cruft?
|
if(!ok)
|
||||||
//if(ok)
|
return false;
|
||||||
// wxRemoveFile(f->mFileName.GetFullPath());
|
|
||||||
//vvvvv ANSWER-ME: Need to return false if !ok?
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
//vvvvv ANSWER-ME: In or out? Cruft?
|
|
||||||
//
|
|
||||||
// if ( !(newFileName == f->mFileName) ) {
|
|
||||||
// bool ok = wxCopyFile(f->mFileName.GetFullPath(),
|
|
||||||
// newFileName.GetFullPath());
|
|
||||||
// if (ok) {
|
|
||||||
// f->mFileName = newFileName;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DirManager::Ref(BlockFile * f)
|
void DirManager::Ref(BlockFile * f)
|
||||||
|
|||||||
Reference in New Issue
Block a user