--- a/src/upmpd.cxx
+++ b/src/upmpd.cxx
@@ -390,12 +390,6 @@
// Do we have an sc2mpd command installed (for songcast)?
if (!ExecCmd::which("sc2mpd", g_sc2mpd_path))
g_sc2mpd_path.clear();
- } else {
- if (access(g_sc2mpd_path.c_str(), X_OK|R_OK) != 0) {
- LOGERR("Specified path for sc2mpd: " << g_sc2mpd_path <<
- " is not executable" << endl);
- g_sc2mpd_path.clear();
- }
}
Pidfile pidfile(pidfilename);
@@ -471,6 +465,16 @@
}
}
+//// Dropped root
+
+ if (!g_sc2mpd_path.empty()) {
+ if (access(g_sc2mpd_path.c_str(), X_OK|R_OK) != 0) {
+ LOGERR("Specified path for sc2mpd: " << g_sc2mpd_path <<
+ " is not executable" << endl);
+ g_sc2mpd_path.clear();
+ }
+ }
+
// Initialize MPD client object. Retry until it works or power fail.
MPDCli *mpdclip = 0;
int mpdretrysecs = 2;