diff common.cpp @ 213:90e70a9024f3

* Make findInPath return empty string if not found -- previous hopelessly fragile behaviour failed in situations where it was called with an absolute path
author Chris Cannam
date Wed, 05 Jan 2011 16:08:37 +0000
parents 1a3af8617ea4
children 478d0222e93d
line wrap: on
line diff
--- a/common.cpp	Wed Jan 05 15:55:36 2011 +0000
+++ b/common.cpp	Wed Jan 05 16:08:37 2011 +0000
@@ -97,7 +97,11 @@
         }
     }
 #endif
-    return name;
+    if (found) {
+        return name;
+    } else {
+        return "";
+    }
 }
 
 #ifdef Q_OS_WIN32