Fix indexing running on start when --index is not passed

This commit is contained in:
Seednode 2023-09-28 16:29:12 -05:00
parent 09ccf91a39
commit 2a7d4e71cc
3 changed files with 7 additions and 5 deletions

View File

@ -398,7 +398,7 @@ Poll:
}
if Verbose {
fmt.Printf("%s | INDEX: Selected %d/%d files across %d/%d directories in %s\n",
fmt.Printf("%s | INDEX: Selecting from %d/%d files across %d/%d directories in %s\n",
time.Now().Format(logDate),
stats.filesMatched,
stats.filesMatched+stats.filesSkipped,

View File

@ -12,7 +12,7 @@ import (
)
const (
ReleaseVersion string = "2.0.1"
ReleaseVersion string = "2.0.2"
)
var (

View File

@ -517,9 +517,11 @@ func ServePage(args []string) error {
fmt.Printf("WARNING! Files *will* be deleted after serving!\n\n")
}
err = importIndex(paths, index, formats)
if err != nil {
return err
if Index {
err = importIndex(paths, index, formats)
if err != nil {
return err
}
}
go func() {