Skip to content

Commit

Permalink
Allow "#" character in local pathnames (don't mix them with config co…
Browse files Browse the repository at this point in the history
…mments).
  • Loading branch information
Dmitry authored and Dmitry committed Jul 16, 2013
1 parent 8ae0c33 commit a572c17
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion realsync
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,9 @@ sub read_config {
open(local *F, $file) or die "Cannot open $file: $!\n";
my %config;
while (<F>) {
s/#.*//sg;
# Comments could be at the beginning of the line only,
# because "#" character is valid e.g. inside a file path.
s/^\s*#.*//sg;
s/^\s+|\s+$//sg;
next if !$_;
my ($k, $v) = ($_ =~ m/^(\w+)(?:\s*=\s*|\s+)(.*)$/s);
Expand Down

0 comments on commit a572c17

Please sign in to comment.