Permalink
Browse files

Make relative prefix logging more verbose

We weren't actually checking the results of the cd() call.  Now log an error
if it fails.

Refs #10890
  • Loading branch information...
1 parent 589efb4 commit cb1775bd23a2c587bb6f73bfb049410e49720507 @Beirdo Beirdo committed Jul 10, 2012
Showing with 9 additions and 5 deletions.
  1. +9 −5 mythtv/libs/libmythbase/mythdirs.cpp
@@ -40,11 +40,15 @@ void InitializeMythDirs(void)
// executable directory. This can be fragile on Unix, so
// use relative PREFIX values with care.
- LOG(VB_GENERAL, LOG_DEBUG,
- "Relative PREFIX! (" + installprefix + ")\n\t\tappDir=" +
- prefixDir.canonicalPath());
-
- prefixDir.cd(installprefix);
+ LOG(VB_GENERAL, LOG_DEBUG, QString("Relative PREFIX! (%1), appDir=%2")
+ .arg(installprefix) .arg(prefixDir.canonicalPath()));
+
+ if (!prefixDir.cd(installprefix))
+ {
+ LOG(VB_GENERAL, LOG_ERR,
+ QString("Relative PREFIX does not resolve, using %1")
+ .arg(prefixDir.canonicalPath()));
+ }
installprefix = prefixDir.canonicalPath();
}

0 comments on commit cb1775b

Please sign in to comment.