1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-13 22:21:11 +02:00

Sweep for filename copying: import and export

This commit is contained in:
Paul Licameli
2016-02-21 23:21:11 -05:00
parent 8f02213e23
commit c3cca71461
6 changed files with 19 additions and 17 deletions

View File

@@ -145,7 +145,7 @@ private:
void doScrollOffset();
wxTextFile *mTextFile;
wxFileName *mLOFFileName; /**< The name of the LOF file, which is used to
wxFileName mLOFFileName; /**< The name of the LOF file, which is used to
interpret relative paths in it */
AudacityProject *mProject;
@@ -164,9 +164,9 @@ private:
LOFImportFileHandle::LOFImportFileHandle(const wxString & name, wxTextFile *file)
: ImportFileHandle(name),
mTextFile(file)
, mLOFFileName{name}
{
mProject = GetActiveProject();
mLOFFileName = new wxFileName(name);
windowCalledOnce = false;
callDurationFactor = false;
durationFactor = 1;
@@ -374,7 +374,7 @@ void LOFImportFileHandle::lofOpenFiles(wxString* ln)
// If path is relative, make absolute path from LOF path
if(!wxIsAbsolutePath(targetfile)) {
wxFileName fName(targetfile);
fName.Normalize(wxPATH_NORM_ALL, mLOFFileName->GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR));
fName.Normalize(wxPATH_NORM_ALL, mLOFFileName.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR));
if(fName.FileExists()) {
targetfile = fName.GetFullPath();
}
@@ -507,7 +507,4 @@ LOFImportFileHandle::~LOFImportFileHandle()
mTextFile->Close();
delete mTextFile;
}
if(mLOFFileName) {
delete mLOFFileName;
}
}

View File

@@ -326,9 +326,9 @@ int OggImportFileHandle::Import(TrackFactory *trackFactory, TrackHolders &outTra
&bitstream);
if (bytesRead == OV_HOLE) {
wxFileName f(mFilename);
wxFileName ff(mFilename);
wxLogError(wxT("Ogg Vorbis importer: file %s is malformed, ov_read() reported a hole"),
f.GetFullName().c_str());
ff.GetFullName().c_str());
/* http://lists.xiph.org/pipermail/vorbis-dev/2001-February/003223.html
* is the justification for doing this - best effort for malformed file,
* hence the message.

View File

@@ -135,11 +135,11 @@ public:
// identify the filename being imported.
void CreateProgress()
{
wxFileName f(mFilename);
wxFileName ff(mFilename);
wxString title;
title.Printf(_("Importing %s"), GetFileDescription().c_str());
mProgress.create(title, f.GetFullName());
mProgress.create(title, ff.GetFullName());
}
// This is similar to GetImporterDescription, but if possible the