#include <gtkmm/messagedialog.h>
+#include <glib/gstdio.h>
+
#include "gtkmm2ext/choice.h"
#include "pbd/pthread_utils.h"
switch (ret) {
case Gtk::RESPONSE_ACCEPT:
- /* force unlink because the backend code will
+ /* force ::g_unlink because the backend code will
go wrong if it tries to open an existing
file for writing.
*/
- ::unlink (path.c_str());
+ ::g_unlink (path.c_str());
break;
default:
return;
#include <jack/types.h>
+#include <glib/gstdio.h>
+
#include "ardour/profile.h"
#include "ardour/rc_configuration.h"
#include "ardour/audio_track.h"
import_status.all_done = true;
#endif
- unlink(path.c_str());
+ ::g_unlink(path.c_str());
}
void
#include <sigc++/bind.h>
#include <libgen.h>
+#include <glib/gstdio.h>
+
#include "pbd/error.h"
#include "pbd/convert.h"
#include "gtkmm2ext/utils.h"
ExportVideoDialog::finished ()
{
if (aborted) {
- unlink(outfn_path_entry.get_text().c_str());
- unlink (insnd.c_str());
+ ::g_unlink(outfn_path_entry.get_text().c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
} else if (twopass && firstpass) {
firstpass = false;
if (twopass_checkbox.get_active()) {
std::string outfn = outfn_path_entry.get_text();
std::string p2log = Glib::path_get_dirname (outfn) + G_DIR_SEPARATOR + "ffmpeg2pass";
- unlink (p2log.c_str());
+ ::g_unlink (p2log.c_str());
}
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_ACCEPT);
}
}
audio_progress_connection.disconnect();
status->finish ();
if (status->aborted()) {
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
return;
}
transcoder = new TranscodeFfmpeg(invid);
if (!transcoder->ffexec_ok()) {
/* ffmpeg binary was not found. TranscodeFfmpeg prints a warning */
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
return;
}
if (!transcoder->probe_ok()) {
/* video input file can not be read */
warning << _("Export Video: Video input file cannot be read.") << endmsg;
- unlink (insnd.c_str());
+ ::g_unlink (insnd.c_str());
Gtk::Dialog::response(RESPONSE_CANCEL);
return;
}
#include <gtkmm/box.h>
#include <gtkmm/stock.h>
+
+#include <glib/gstdio.h>
#include <glibmm/fileutils.h>
#include "pbd/convert.h"
goto out;
}
- unlink (tmpc);
+ ::g_unlink (tmpc);
}
ret = true;
#include <sigc++/bind.h>
#include <libgen.h>
+#include <glib/gstdio.h>
+
#include "pbd/error.h"
#include "pbd/convert.h"
#include "gtkmm2ext/utils.h"
TranscodeVideoDialog::finished ()
{
if (aborted) {
- unlink(path_entry.get_text().c_str());
+ ::g_unlink(path_entry.get_text().c_str());
if (!audiofile.empty()) {
- unlink(audiofile.c_str());
+ ::g_unlink(audiofile.c_str());
}
Gtk::Dialog::response(RESPONSE_CANCEL);
} else {
if (!tree.write (path)) {
error << string_compose (_("could not save AU cache to %1"), path) << endmsg;
- unlink (path.c_str());
+ ::g_unlink (path.c_str());
}
}
#include <sndfile.h>
+#include <glib/gstdio.h>
#include <glibmm/miscutils.h>
#include <glibmm/fileutils.h>
#include <glibmm/threads.h>
{
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());
}
}
int
AudioFileSource::move_dependents_to_trash()
{
- return ::unlink (peakpath.c_str());
+ return ::g_unlink (peakpath.c_str());
}
void
out:
if (ret) {
DEBUG_TRACE (DEBUG::Peaks, string_compose("Could not write peak data, attempting to remove peakfile %1\n", peakpath));
- unlink (peakpath.c_str());
+ ::g_unlink (peakpath.c_str());
}
return ret;
#include "ardour/export_handler.h"
+#include <glib/gstdio.h>
#include <glibmm.h>
#include <glibmm/convert.h>
} catch (std::exception& e) {
error << string_compose (_("an error occured while writing a TOC/CUE file: %1"), e.what()) << endmsg;
- ::unlink (filepath.c_str());
+ ::g_unlink (filepath.c_str());
} catch (Glib::Exception& e) {
error << string_compose (_("an error occured while writing a TOC/CUE file: %1"), e.what()) << endmsg;
- ::unlink (filepath.c_str());
+ ::g_unlink (filepath.c_str());
}
}
#include <sndfile.h>
#include <samplerate.h>
+#include <glib/gstdio.h>
#include <glibmm.h>
#include <boost/scoped_array.hpp>
boost::shared_ptr<FileSource> fs = boost::dynamic_pointer_cast<FileSource> (source);
if (fs) {
- ::unlink (fs->path().c_str());
+ ::g_unlink (fs->path().c_str());
}
}
#include <cstdlib>
#include <cstring>
+#include <glib/gstdio.h>
#include <giomm/file.h>
#include <glib/gprintf.h>
#include <glibmm.h>
name + ".ttl"
)
);
- unlink(preset_file.c_str());
+ ::g_unlink(preset_file.c_str());
}
bool
string peakpath = peak_path (base);
if (Glib::file_test (peakpath.c_str(), Glib::FILE_TEST_EXISTS)) {
- if (::unlink (peakpath.c_str()) != 0) {
+ if (::g_unlink (peakpath.c_str()) != 0) {
error << string_compose (_("cannot remove peakfile %1 for %2 (%3)"),
peakpath, _path, strerror (errno))
<< endmsg;
#include "pbd/stl_delete.h"
#include "pbd/strsplit.h"
+#include <glib/gstdio.h>
#include <glibmm/miscutils.h>
#include "evoral/Control.hpp"
SMFSource::~SMFSource ()
{
if (removable()) {
- unlink (_path.c_str());
+ ::g_unlink (_path.c_str());
}
}
#include <iostream>
+#include <glib/gstdio.h>
+
#include "pbd/xml++.h"
#include "pbd/convert.h"
save (*root);
if (!tree.write (path)) {
- ::unlink (path.c_str());
+ ::g_unlink (path.c_str());
return false;
}
#include <unistd.h>
#include <stdio.h> /* for snprintf, grrr */
+#include <glib/gstdio.h>
+
#include <gdk/gdkkeysyms.h>
#include <gtkmm.h>
pixbuf = Gdk::Pixbuf::create_from_file (path);
} catch (const Gdk::PixbufError &e) {
std::cerr << "Caught PixbufError: " << e.what() << std::endl;
- unlink (path);
+ ::g_unlink (path);
throw;
} catch (...) {
- unlink (path);
+ ::g_unlink (path);
g_message("Caught ... ");
throw;
}
- unlink (path);
+ ::g_unlink (path);
g_free(path);
#include <errno.h>
#include <string.h>
+#include <glib/gstdio.h>
#include <glibmm/miscutils.h>
#include "pbd/error.h"
continue;
}
- if (::unlink (fullpath.c_str())) {
+ if (::g_unlink (fullpath.c_str())) {
error << string_compose (_("cannot remove file %1 (%2)"), fullpath, strerror (errno))
<< endmsg;
ret = 1;
{
struct usb_tranzport *dev = urb->context;
- /* sync/async unlink faults aren't errors */
+ /* sync/async ::g_unlink faults aren't errors */
if (urb->status && !(urb->status == -ENOENT ||
urb->status == -ECONNRESET ||
urb->status == -ESHUTDOWN))
#include <unistd.h>
#include <fcntl.h>
+#include <glib/gstdio.h>
#include <glibmm/miscutils.h>
#include <pbd/pthread_utils.h>
int fd = mkstemp(tmpstr);
if (fd >= 0 ) {
- unlink (tmpstr);
+ ::g_unlink (tmpstr);
close (fd);
_osc_unix_server = lo_server_new (tmpstr, error_callback);
}
if (!_osc_unix_socket_path.empty()) {
- unlink (_osc_unix_socket_path.c_str());
+ ::g_unlink (_osc_unix_socket_path.c_str());
}
if (!_osc_url_file.empty() ) {
- unlink (_osc_url_file.c_str() );
+ ::g_unlink (_osc_url_file.c_str() );
}
// Delete any active route observers