Commit a69e6d9
committed
Allow DOS-style line endings in ~/.pgpass files.
On Windows, libc will mask \r\n line endings for us, since we read the
password file in text mode. But that doesn't happen on Unix. People
who share password files across both systems might have \r\n line endings
in a file they use on Unix, so as a convenience, ignore trailing \r.
Per gripe from Josh Berkus.
In passing, put the existing check for empty line somewhere where it's
actually useful, ie after stripping the newline not before.
Vik Fearing, adjusted a bit by me
Discussion: <0de37763-5843-b2cc-855e-5d0e5df25807@agliodbs.com>1 parent 8aa3e47 commit a69e6d9
1 file changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5783 | 5783 | | |
5784 | 5784 | | |
5785 | 5785 | | |
5786 | | - | |
5787 | | - | |
5788 | 5786 | | |
5789 | 5787 | | |
5790 | | - | |
5791 | | - | |
| 5788 | + | |
| 5789 | + | |
| 5790 | + | |
| 5791 | + | |
| 5792 | + | |
| 5793 | + | |
| 5794 | + | |
| 5795 | + | |
| 5796 | + | |
| 5797 | + | |
5792 | 5798 | | |
5793 | 5799 | | |
5794 | 5800 | | |
5795 | 5801 | | |
5796 | 5802 | | |
5797 | 5803 | | |
| 5804 | + | |
| 5805 | + | |
5798 | 5806 | | |
5799 | 5807 | | |
5800 | 5808 | | |
| |||
0 commit comments