X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Faudiofilesource.cc;h=9c1b969190c530d8cb2ec95b066b1b02b0c349a1;hb=ac9219a3c884b69352ff5ab0d13f30fb15cf8e6e;hp=8c3bf0017659cfcfb9561d48c130a9ff81e4ba13;hpb=b660bc8ae92d19aedf0165815432b77a0c6170c4;p=ardour.git diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc index 8c3bf00176..9c1b969190 100644 --- a/libs/ardour/audiofilesource.cc +++ b/libs/ardour/audiofilesource.cc @@ -32,6 +32,7 @@ #include "pbd/convert.h" #include "pbd/basename.h" +#include "pbd/file_utils.h" #include "pbd/mountpoint.h" #include "pbd/stl_delete.h" #include "pbd/strsplit.h" @@ -41,6 +42,7 @@ #include +#include #include #include #include @@ -150,8 +152,8 @@ AudioFileSource::~AudioFileSource () { DEBUG_TRACE (DEBUG::Destruction, string_compose ("AudioFileSource destructor %1, removable? %2\n", _path, removable())); if (removable()) { - unlink (_path.c_str()); - unlink (peakpath.c_str()); + ::g_unlink (_path.c_str()); + ::g_unlink (peakpath.c_str()); } } @@ -309,7 +311,7 @@ AudioFileSource::mark_streaming_write_completed () int AudioFileSource::move_dependents_to_trash() { - return ::unlink (peakpath.c_str()); + return ::g_unlink (peakpath.c_str()); } void @@ -412,3 +414,4 @@ AudioFileSource::get_interleave_buffer (framecnt_t size) return ssb->buf; } +