13
0

Use sys::remove instead of ::unlink in Session::remove_empty_sounds for portability

git-svn-id: svn://localhost/ardour2/trunk@2411 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Tim Mayberry 2007-09-04 09:01:31 +00:00
parent 41ba22d225
commit d7c5629376

View File

@ -3395,10 +3395,16 @@ Session::remove_empty_sounds ()
if (AudioFileSource::is_empty (*this, audio_file_path.to_string())) {
unlink (audio_file_path.to_string().c_str());
string peak_path = peak_path_from_audio_path (audio_file_path.to_string());
unlink (peak_path.c_str());
try
{
sys::remove (audio_file_path);
const string peak_path = peak_path_from_audio_path (audio_file_path.to_string());
sys::remove (peak_path);
}
catch (const sys::filesystem_error& err)
{
error << err.what() << endmsg;
}
}
}
}