Fix to enable extracting scheme from str(no ://)
authoryons.kim <yons.kim@samsung.com>
Mon, 31 Aug 2015 10:49:10 +0000 (19:49 +0900)
committeryons.kim <yons.kim@samsung.com>
Mon, 31 Aug 2015 10:49:10 +0000 (19:49 +0900)
- enables getting scheme from string which is without '://'
- for below situation
- info_uri: tct / request_uri: tct://test_runner

Change-Id: I442d8a3a1e93e6f3229a41a6b2b619c97c100658

src/common/file_utils.cc

index 6cf7bdb4d88cc618ec9e5d196c58bcdb9bc49172..74b3fbd85018c53920581bf452f95374b5f42722 100755 (executable)
@@ -46,7 +46,7 @@ std::string SchemeName(const std::string& uri) {
   if (pos != std::string::npos && pos < uri.length()) {
     return std::string(uri.substr(0, pos));
   } else {
-    return std::string();
+    return uri;
   }
 }