Skip to content

Commit

Permalink
- Replace the absolute path to the home directory with $ENV{HOME} i…
Browse files Browse the repository at this point in the history
…nside the dumped configuration output (when they are equal).
  • Loading branch information
trizen committed Sep 11, 2017
1 parent 57f0b68 commit d2b716a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion obbrowser
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# Name: obbrowser
# License: GPLv3
# Date: 29 December 2012
# Latest edit: 19 July 2017
# Latest edit: 11 September 2017
# https://github.com/trizen/obbrowser

# ---------------------------------------------------------
Expand Down Expand Up @@ -135,6 +135,7 @@ sub dump_configuration {
open my $config_fh, '>', $config_file
or die "Can't open file '${config_file}' for write: $!";
my $dumped_config = q{our $CONFIG = } . Data::Dump::dump(\%CONFIG);
$dumped_config =~ s/\Q$home_dir\E/\$ENV{HOME}/g if ($home_dir eq $ENV{HOME});
print $config_fh $config_documentation, $dumped_config;
close $config_fh;
}
Expand Down

0 comments on commit d2b716a

Please sign in to comment.