diff --git a/cmd/files.go b/cmd/files.go index b34bea6..f55cb9e 100644 --- a/cmd/files.go +++ b/cmd/files.go @@ -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, diff --git a/cmd/root.go b/cmd/root.go index 41ddd5c..ca74ad9 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -12,7 +12,7 @@ import ( ) const ( - ReleaseVersion string = "2.0.1" + ReleaseVersion string = "2.0.2" ) var ( @@ -95,7 +95,7 @@ func init() { rootCmd.Flags().BoolVar(&Flash, "flash", false, "enable support for shockwave flash files (via ruffle.rs)") rootCmd.Flags().BoolVar(&Handlers, "handlers", false, "display registered handlers (for debugging)") rootCmd.Flags().BoolVar(&Images, "images", false, "enable support for image files") - rootCmd.Flags().BoolVarP(&Index, "index", "c", false, "generate index of supported file paths at startup") + rootCmd.Flags().BoolVar(&Index, "index", false, "generate index of supported file paths at startup") rootCmd.Flags().StringVar(&IndexFile, "index-file", "", "path to optional persistent index file") rootCmd.Flags().BoolVarP(&Info, "info", "i", false, "expose informational endpoints") rootCmd.Flags().IntVar(&MaxDirScans, "max-directory-scans", 32, "number of directories to scan at once") diff --git a/cmd/web.go b/cmd/web.go index 4d931e1..47f121e 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -503,6 +503,11 @@ func ServePage(args []string) error { if err != nil { return err } + + err = importIndex(paths, index, formats) + if err != nil { + return err + } } if Info { @@ -517,11 +522,6 @@ 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 - } - go func() { for err := range errorChannel { fmt.Printf("%s | ERROR: %v\n", time.Now().Format(logDate), err) diff --git a/default.pgo b/default.pgo index 4cb2d07..e6a48e2 100644 Binary files a/default.pgo and b/default.pgo differ