소스 검색

Make BuildUrl more robust for file urls

Marco Nolden 10 년 전
부모
커밋
b7a75b5599
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      Libs/PluginFramework/ctkLocationManager.cpp

+ 2 - 2
Libs/PluginFramework/ctkLocationManager.cpp

@@ -71,9 +71,9 @@ static bool isInitialized = false;
 //----------------------------------------------------------------------------
 static QUrl BuildUrl(const QString& location, bool trailingSlash)
 {
-  QUrl result(location);
+  QUrl result(location,QUrl::StrictMode);
 
-  if (!result.isValid() || result.scheme().isEmpty())
+  if (!result.isValid() || result.scheme().compare("file", Qt::CaseInsensitive) != 0)
   {
     result = QUrl::fromLocalFile(location);
   }