13
0

Use g_lstat instead of lstat for portability

This commit is contained in:
Tim Mayberry 2013-07-17 16:41:48 +10:00
parent 15be154515
commit c92e1a0742

View File

@ -37,9 +37,8 @@
#include <unistd.h> #include <unistd.h>
#include <time.h> #include <time.h>
#include <sys/resource.h> #include <glib.h>
#include <sys/types.h> #include <glib/gstdio.h>
#include <sys/sysctl.h>
#include <gtkmm/messagedialog.h> #include <gtkmm/messagedialog.h>
#include <gtkmm/accelmap.h> #include <gtkmm/accelmap.h>
@ -3398,11 +3397,11 @@ ARDOUR_UI::start_video_server (Gtk::Window* float_window, bool popup_msg)
if (icsd_docroot.empty()) {icsd_docroot = X_("/");} if (icsd_docroot.empty()) {icsd_docroot = X_("/");}
struct stat sb; struct stat sb;
if (!lstat (icsd_docroot.c_str(), &sb) == 0 || !S_ISDIR(sb.st_mode)) { if (!g_lstat (icsd_docroot.c_str(), &sb) == 0 || !S_ISDIR(sb.st_mode)) {
warning << _("Specified docroot is not an existing directory.") << endmsg; warning << _("Specified docroot is not an existing directory.") << endmsg;
continue; continue;
} }
if ( (!lstat (icsd_exec.c_str(), &sb) == 0) if ( (!g_lstat (icsd_exec.c_str(), &sb) == 0)
|| (sb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) == 0 ) { || (sb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) == 0 ) {
warning << _("Given Video Server is not an executable file.") << endmsg; warning << _("Given Video Server is not an executable file.") << endmsg;
continue; continue;