Browse Source

Fixed asset path resolver to use the second segment instead of first. (#3472)

Co-authored-by: Sam <@>
Sam Jude 5 months ago
parent
commit
04841063aa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/desktop/src/protocol.rs

+ 1 - 1
packages/desktop/src/protocol.rs

@@ -57,7 +57,7 @@ pub(super) fn desktop_handler(
     }
 
     // todo: we want to move the custom assets onto a different protocol or something
-    if let Some(name) = request.uri().path().split('/').next() {
+    if let Some(name) = request.uri().path().split('/').nth(1) {
         if asset_handlers.has_handler(name) {
             let _name = name.to_string();
             return asset_handlers.handle_request(&_name, request, responder);