From 250a2ea62d3262cdcf1ab2bccb10b39bf1167405 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Sun, 7 Jun 2020 10:33:56 +0200 Subject: [PATCH] Enable sidecar files in readonly mode if path is absolute #268 #348 Signed-off-by: Michael Mayer --- internal/config/filenames.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/config/filenames.go b/internal/config/filenames.go index e54b2e686..3ea3d620f 100644 --- a/internal/config/filenames.go +++ b/internal/config/filenames.go @@ -178,7 +178,7 @@ func (c *Config) ExifToolBin() string { // SidecarJson returns true if metadata should be synced with json sidecar files as used by exiftool. func (c *Config) SidecarJson() bool { - if c.ReadOnly() || c.ExifToolBin() == "" { + if (c.ReadOnly() && !filepath.IsAbs(c.SidecarPath())) || c.ExifToolBin() == "" { return false } @@ -187,7 +187,7 @@ func (c *Config) SidecarJson() bool { // SidecarYaml returns true if metadata should be synced with PhotoPrism YAML sidecar files. func (c *Config) SidecarYaml() bool { - if c.ReadOnly() { + if c.ReadOnly() && !filepath.IsAbs(c.SidecarPath()) { return false }