Parcourir la source

fix http index_of cache invalid bug (#695)

宅の士 il y a 8 mois
Parent
commit
758b4c129e
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  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;
     }