mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-05 13:15:44 +01:00
Use sys::remove instead of ::unlink in Session::remove_pending_capture_state for portability
git-svn-id: svn://localhost/ardour2/trunk@2373 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
29842063e3
commit
911e30a73a
1 changed files with 11 additions and 3 deletions
|
|
@ -494,11 +494,19 @@ Session::maybe_write_autosave()
|
|||
void
|
||||
Session::remove_pending_capture_state ()
|
||||
{
|
||||
sys::path xml_path(_session_dir->root_path());
|
||||
sys::path pending_state_file_path(_session_dir->root_path());
|
||||
|
||||
xml_path /= _current_snapshot_name + pending_suffix;
|
||||
pending_state_file_path /= _current_snapshot_name + pending_suffix;
|
||||
|
||||
unlink (xml_path.to_string().c_str());
|
||||
try
|
||||
{
|
||||
sys::remove (pending_state_file_path);
|
||||
}
|
||||
catch(sys::filesystem_error& ex)
|
||||
{
|
||||
error << string_compose(_("Could remove pending capture state at path \"%1\" (%2)"),
|
||||
pending_state_file_path.to_string(), ex.what()) << endmsg;
|
||||
}
|
||||
}
|
||||
|
||||
/** Rename a state file.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue