소스 검색

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

Co-authored-by: Sam <@>
Sam Jude 5 달 전
부모
커밋
04841063aa
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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
     // 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) {
         if asset_handlers.has_handler(name) {
             let _name = name.to_string();
             let _name = name.to_string();
             return asset_handlers.handle_request(&_name, request, responder);
             return asset_handlers.handle_request(&_name, request, responder);