cnfzv
V2EX  ›  Rust

rocket 问题求助

  •  
  •   cnfzv · Dec 1, 2019 · 4131 views
    This topic created in 2366 days ago, the information mentioned may be changed or developed.

    Cached::long(NamedFile::open(Path::new(&CONFIG.web_vault_folder()).join(p)).ok()) 可以处理正常页面,但是如果访问的是一个目录会报下面的错误 Failed to write response: Os { code: 21, kind: Other, message: "Is a directory" }. 请问如何对这个错误进行处理,返回自定义页面? google 百度了好久,作为一个新手实在找不到解决方法了,所以求助各位

    1 replies    2019-12-01 15:29:41 +08:00
    cnfzv
        1
    cnfzv  
    OP
       Dec 1, 2019
    有大佬能帮帮我么
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2996 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 08:55 · PVG 16:55 · LAX 01:55 · JFK 04:55
    ♥ Do have faith in what you're doing.