summaryrefslogtreecommitdiff
path: root/mg_db.c
diff options
context:
space:
mode:
Diffstat (limited to 'mg_db.c')
-rw-r--r--mg_db.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mg_db.c b/mg_db.c
index 4465d0d..2a3878c 100644
--- a/mg_db.c
+++ b/mg_db.c
@@ -648,11 +648,11 @@ static char *mg_readline(FILE *f)
static const char *FINDCMD = "cd '%s' 2>/dev/null && find -follow -name '%s' -print 2>/dev/null";
static string
-GdFindFile( string tld, string mp3file )
+GdFindFile( const char* tld, string mp3file )
{
string result = "";
char *cmd = 0;
- asprintf( &cmd, FINDCMD, tld.c_str(), mp3file.c_str() );
+ asprintf( &cmd, FINDCMD, tld, mp3file.c_str() );
FILE *p = popen( cmd, "r" );
if (p)
{
@@ -670,7 +670,7 @@ GdFindFile( string tld, string mp3file )
string
mgContentItem::getSourceFile(bool AbsolutePath) const
{
- const string& tld = the_setup.ToplevelDir;
+ const char* tld = the_setup.ToplevelDir;
string result="";
if (AbsolutePath) result = tld;
if (the_setup.GdCompatibility)
@@ -906,7 +906,8 @@ void
mgSelection::refreshValues () const
{
assert(this);
- if (!m_db) return;
+ if (!m_db)
+ return;
if (m_current_values.empty())
{
mgOrder o1 = order;