From 0276e3732e8d72442d7b1d1da5343265f0957224 Mon Sep 17 00:00:00 2001 From: boggs Date: Sun, 22 Dec 2019 20:01:00 +0000 Subject: [PATCH] Use Etc.getpwuid.name instead of Etc.getlogin --- lib/um/topic.rb | 2 +- lib/um/umconfig.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/um/topic.rb b/lib/um/topic.rb index b85ae20..33a990b 100644 --- a/lib/um/topic.rb +++ b/lib/um/topic.rb @@ -26,7 +26,7 @@ class << self private def topic_file_path - tmp_dir_path = '/var/tmp/um/' + Etc.getlogin + tmp_dir_path = '/var/tmp/um/' + Etc.getpwuid.name FileUtils.mkdir_p tmp_dir_path tmp_dir_path + '/current.topic' diff --git a/lib/um/umconfig.rb b/lib/um/umconfig.rb index 728fa82..ac0fff0 100644 --- a/lib/um/umconfig.rb +++ b/lib/um/umconfig.rb @@ -110,7 +110,7 @@ class << self # Cache the current pages directory in a file. This is used by the bash # completion script to avoid spinning up Ruby. def write_pages_directory(pages_directory_path) - tmp_dir_path = '/var/tmp/um/' + Etc.getlogin + tmp_dir_path = '/var/tmp/um/' + Etc.getpwuid.name FileUtils.mkdir_p tmp_dir_path tmp_file_path = tmp_dir_path + '/current.pagedir'