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 (
|
const (
|
||||||
Version string = "0.63.0"
|
Version string = "0.63.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -841,10 +841,6 @@ func serveStaticFile(paths []string, stats *ServeStats, index *Index) httprouter
|
||||||
fileSize := humanReadableSize(len(buf))
|
fileSize := humanReadableSize(len(buf))
|
||||||
|
|
||||||
if russian {
|
if russian {
|
||||||
if cache {
|
|
||||||
index.Remove(filePath)
|
|
||||||
}
|
|
||||||
|
|
||||||
err = os.Remove(filePath)
|
err = os.Remove(filePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
@ -853,6 +849,10 @@ func serveStaticFile(paths []string, stats *ServeStats, index *Index) httprouter
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cache {
|
||||||
|
index.Remove(filePath)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if verbose {
|
if verbose {
|
||||||
|
|
Loading…
Reference in New Issue