Config: Show error if originals and storage path seem identical #1642

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2024-01-21 14:22:16 +01:00
parent 7917482580
commit 86dc89c4b9
37 changed files with 464 additions and 235 deletions

View File

@@ -105,8 +105,10 @@ func startAction(ctx *cli.Context) error {
}
if child != nil {
if !fs.Overwrite(conf.PIDFilename(), []byte(strconv.Itoa(child.Pid))) {
if writeErr := fs.WriteString(conf.PIDFilename(), strconv.Itoa(child.Pid)); writeErr != nil {
log.Error(writeErr)
log.Fatalf("failed writing process id to %s", clean.Log(conf.PIDFilename()))
return nil
}
log.Infof("daemon started with process id %v\n", child.Pid)