changed: No longer need to translate for ftp
authorarnova <arnova@void.org>
Wed, 20 Jun 2012 14:12:22 +0000 (16:12 +0200)
committerarnova <arnova@void.org>
Mon, 2 Jul 2012 17:50:41 +0000 (19:50 +0200)
xbmc/utils/URIUtils.cpp

index 5575f49..54400af 100644 (file)
@@ -662,10 +662,8 @@ bool URIUtils::IsFTP(const CStdString& strFile)
   if (IsStack(strFile))
     strFile2 = CStackDirectory::GetFirstStackedFile(strFile);
 
-  CURL url(strFile2);
-
-  return url.GetTranslatedProtocol() == "ftp"  ||
-         url.GetTranslatedProtocol() == "ftps";
+  return strFile2.Left(4).Equals("ftp:")  ||
+         strFile2.Left(5).Equals("ftps:");
 }
 
 bool URIUtils::IsInternetStream(const CURL& url, bool bStrictCheck /* = false */)
@@ -682,7 +680,7 @@ bool URIUtils::IsInternetStream(const CURL& url, bool bStrictCheck /* = false */
   CStdString strProtocol2 = url.GetTranslatedProtocol();
 
   // Special case these
-  if (strProtocol2 == "ftp"   || strProtocol2 == "ftps"   ||
+  if (strProtocol  == "ftp"   || strProtocol  == "ftps"   ||
       strProtocol  == "dav"   || strProtocol  == "davs")
     return bStrictCheck;