diff --git a/install-discord-linux.rb b/install-discord-linux.rb index a8f0020..f2027ad 100755 --- a/install-discord-linux.rb +++ b/install-discord-linux.rb @@ -109,7 +109,7 @@ OptionParser.new do |parser| parser.on('-b', '--backup [FILENAME]', "Backup Discord Installation") do |backup_filename| $CONFIG[:action] = 'backup' if backup_filename.nil? - $CONFIG[:backup_filename] = 'discord-backup-' + Time.now.strftime('%Y-%m-%d') + '.tar.gz' + $CONFIG[:backup_filename] = Dir.home / 'discord-backup-' + Time.now.strftime('%Y-%m-%d') + '.tar.gz' else $CONFIG[:backup_filename] = backup_filename + ".tar.gz" end @@ -258,7 +258,7 @@ def make_backup end Dir.chdir(Dir.home) do - puts "make_backup: Beginning backup process (OUTPUT_FILE = #{Dir.getwd/$CONFIG[:backup_filename]})" + puts "make_backup: Beginning backup process (OUTPUT_FILE = #{$CONFIG[:backup_filename]})" File.open($CONFIG[:backup_filename], "wb") do |backup_file| Zlib::GzipWriter.wrap(backup_file) do |gzip| Gem::Package::TarWriter.new(gzip) do |tar|