From 228612123446b004af14eeffc0c62fdda1a0ed78 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Thu, 4 Mar 2021 16:01:30 +0100 Subject: [PATCH] Fix file name sanitization in LibreOffice previewer [SCI-5541] --- lib/active_storage/previewer/libreoffice_previewer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/active_storage/previewer/libreoffice_previewer.rb b/lib/active_storage/previewer/libreoffice_previewer.rb index 87eb6ecf8..4a291f7a1 100644 --- a/lib/active_storage/previewer/libreoffice_previewer.rb +++ b/lib/active_storage/previewer/libreoffice_previewer.rb @@ -21,7 +21,7 @@ module ActiveStorage begin success = system( - "#{libreoffice_path} --headless --invisible --convert-to png --outdir #{work_dir} #{input.path}" + libreoffice_path, '--headless', '--invisible', '--convert-to', 'png', '--outdir', work_dir, input.path ) unless success && File.file?(preview_file)