From 1e3d860d7b402badcffd38cbd7819cfca3eed415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Van=C3=AD=C4=8Dek?= Date: Tue, 28 Mar 2023 23:13:21 +0200 Subject: [PATCH] FIX Allow logo removal without file delete to allow docker binding to the file. --- patches/uxupgrade_logo.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/patches/uxupgrade_logo.patch b/patches/uxupgrade_logo.patch index d1deef1..fd33396 100644 --- a/patches/uxupgrade_logo.patch +++ b/patches/uxupgrade_logo.patch @@ -19,7 +19,16 @@ LOGIN_DESKTOP_FILE = 'login-2k.jpg' LOGIN_MOBILE_FILE = 'login.jpg' -@@ -153,10 +154,8 @@ module RedmineXUxUpgrade +@@ -141,8 +142,6 @@ module RedmineXUxUpgrade + return unless old_attachment + + if name == LOGO_NAME +- path_to_logo = image_path(name, old_attachment.disk_filename) +- File.delete(path_to_logo) if path_to_logo && File.exist?(path_to_logo) + else + FileUtils.cp_r(default_image_path(name), image_path(name)) + end +@@ -153,10 +152,8 @@ module RedmineXUxUpgrade # @param [String | nil] filename - name of the filename of the logo file # @return [String] - path to file corresponding to the given name def self.image_path(name, filename=nil)