From aeb889aeff7b6edd665d772cce94724423f5892a Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Sun, 7 Jun 2020 10:29:54 +0200 Subject: [PATCH] Enable conversion in readonly mode if sidecar path is set #268 #348 Signed-off-by: Michael Mayer --- internal/api/index.go | 2 +- internal/commands/index.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/index.go b/internal/api/index.go index 3c23eeb45..acc6838f9 100644 --- a/internal/api/index.go +++ b/internal/api/index.go @@ -38,7 +38,7 @@ func StartIndexing(router *gin.RouterGroup, conf *config.Config) { indOpt := photoprism.IndexOptions{ Rescan: f.Rescan, - Convert: f.Convert && !conf.ReadOnly(), + Convert: f.Convert && (!conf.ReadOnly() || filepath.IsAbs(conf.SidecarPath())), Path: filepath.Clean(f.Path), } diff --git a/internal/commands/index.go b/internal/commands/index.go index 58bdc5659..78da7ba47 100644 --- a/internal/commands/index.go +++ b/internal/commands/index.go @@ -65,7 +65,7 @@ func indexAction(ctx *cli.Context) error { indOpt := photoprism.IndexOptions{ Path: subPath, Rescan: ctx.Bool("all"), - Convert: conf.Settings().Index.Convert && !conf.ReadOnly(), + Convert: conf.Settings().Index.Convert && (!conf.ReadOnly() || filepath.IsAbs(conf.SidecarPath())), } indexed := ind.Start(indOpt)