Only remove file from cache after file has been removed from filesystem when --russian is passed
This commit is contained in:
parent
494f9271f4
commit
c7984d0743
|
@ -17,7 +17,7 @@ var (
|
|||
)
|
||||
|
||||
const (
|
||||
Version string = "0.63.0"
|
||||
Version string = "0.63.1"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue