Sfoglia il codice sorgente

fix http index_of cache invalid bug (#695)

宅の士 8 mesi fa
parent
commit
758b4c129e
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      http/server/FileCache.h

+ 1 - 0
http/server/FileCache.h

@@ -36,6 +36,7 @@ typedef struct file_cache_s {
     }
 
     bool is_complete() {
+        if(S_ISDIR(st.st_mode)) return filebuf.len > 0;
         return filebuf.len == st.st_size;
     }