Browse Source

- 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 9 years ago
parent
commit
f4463afec5
1 changed files with 4 additions and 2 deletions
  1. 4 2
      Source/AtomicWebView/WebSchemeHandler.cpp

+ 4 - 2
Source/AtomicWebView/WebSchemeHandler.cpp

@@ -62,8 +62,8 @@ public:
             return false;
             return false;
 
 
         ConvertCEFString(request->GetURL(), url_);
         ConvertCEFString(request->GetURL(), url_);
-        // shave off atomic://resources/
-        url_ = url_.SubstringUTF8(19);
+        //shave off the atomic:// part
+        url_ = url_.SubstringUTF8(9);
 
 
         if (IsAbsolutePath(url_))
         if (IsAbsolutePath(url_))
         {
         {
@@ -71,6 +71,8 @@ public:
         }
         }
         else
         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>();
             ResourceCache* cache = webBrowserHost_->GetSubsystem<ResourceCache>();
             file_ = cache->GetFile(url_, false);
             file_ = cache->GetFile(url_, false);
         }
         }