mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-07 04:01:54 +01:00
Rewrite DirManager::EnsureSafeFileName without downcasts...
... weakening but not yet eliminating dependency on BlockFile subclasses
This commit is contained in:
@@ -133,6 +133,16 @@ void BlockFile::SetFileName(wxFileNameWrapper &&name)
|
||||
mFileName=std::move(name);
|
||||
}
|
||||
|
||||
const wxFileNameWrapper &BlockFile::GetExternalFileName() const
|
||||
{
|
||||
static wxFileNameWrapper empty;
|
||||
return empty;
|
||||
}
|
||||
|
||||
void BlockFile::SetExternalFileName( wxFileNameWrapper && )
|
||||
{
|
||||
wxASSERT( false );
|
||||
}
|
||||
|
||||
/// Marks this BlockFile as "locked." A locked BlockFile may not
|
||||
/// be moved or deleted, only copied. Locking a BlockFile prevents
|
||||
@@ -724,6 +734,16 @@ AliasBlockFile::~AliasBlockFile()
|
||||
{
|
||||
}
|
||||
|
||||
const wxFileNameWrapper &AliasBlockFile::GetExternalFileName() const
|
||||
{
|
||||
return GetAliasedFileName();
|
||||
}
|
||||
|
||||
void AliasBlockFile::SetExternalFileName( wxFileNameWrapper &&newName )
|
||||
{
|
||||
ChangeAliasedFileName( std::move( newName ) );
|
||||
}
|
||||
|
||||
/// Read the summary of this alias block from disk. Since the audio data
|
||||
/// is elsewhere, this consists of reading the entire summary file.
|
||||
/// Fill with zeroes and return false if data are unavailable for any reason.
|
||||
|
||||
Reference in New Issue
Block a user