瀏覽代碼

- 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 年之前
父節點
當前提交
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);
         }