Просмотр исходного кода

- find issue with atomic://resource calls not working when an absolute path is passed in. First it will trim off the atomic part to detect an absolute path and only then continue on to strip off the resources part.

Shaddock Heath 10 лет назад
Родитель
Сommit
f4463afec5
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      Source/AtomicWebView/WebSchemeHandler.cpp

+ 4 - 2
Source/AtomicWebView/WebSchemeHandler.cpp

@@ -62,8 +62,8 @@ public:
             return false;
 
         ConvertCEFString(request->GetURL(), url_);
-        // shave off atomic://resources/
-        url_ = url_.SubstringUTF8(19);
+        //shave off the atomic:// part
+        url_ = url_.SubstringUTF8(9);
 
         if (IsAbsolutePath(url_))
         {
@@ -71,6 +71,8 @@ public:
         }
         else
         {
+            //shave off the resources part so we can grab the value from the resource cache
+            url_ = url_.SubstringUTF8(10);
             ResourceCache* cache = webBrowserHost_->GetSubsystem<ResourceCache>();
             file_ = cache->GetFile(url_, false);
         }