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:
parent
41ba22d225
commit
d7c5629376
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user