Only remove file from cache after file has been removed from filesystem when --russian is passed

This commit is contained in:
Seednode 2023-09-10 21:28:27 -05:00
parent 494f9271f4
commit c7984d0743
2 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@ var (
)
const (
Version string = "0.63.0"
Version string = "0.63.1"
)
var (

View File

@ -841,10 +841,6 @@ func serveStaticFile(paths []string, stats *ServeStats, index *Index) httprouter
fileSize := humanReadableSize(len(buf))
if russian {
if cache {
index.Remove(filePath)
}
err = os.Remove(filePath)
if err != nil {
fmt.Println(err)
@ -853,6 +849,10 @@ func serveStaticFile(paths []string, stats *ServeStats, index *Index) httprouter
return
}
if cache {
index.Remove(filePath)
}
}
if verbose {