From da347d1bb45ad3b08b2aa0b40041c67dac0df3c5 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Thu, 8 May 2014 11:02:04 +0200 Subject: [PATCH] Apply the locale encoding to `tar --version` Fixes a bug with non-UTF8 locales introduced by 2b816075dc71dfe8f6f9e5349fdff7f03ad9dad0. --- CHANGELOG | 1 + lib/backup/manager.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index cc271f5e2cd..61eb24f1c53 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,7 @@ v 6.9.0 - Stop refreshing comments when the tab is hidden - Improve issue and merge request mobile UI (Drew Blessing) - Document how to convert a backup to PostgreSQL + - Fix locale bug in backup manager v 6.8.0 - Ability to at mention users that are participating in issue and merge req. discussion diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb index 05814fc78f6..28e323fe30d 100644 --- a/lib/backup/manager.rb +++ b/lib/backup/manager.rb @@ -101,7 +101,7 @@ module Backup def tar_version tar_version, _ = Gitlab::Popen.popen(%W(tar --version)) - tar_version.split("\n").first + tar_version.force_encoding('locale').split("\n").first end end end