monochromegane / the_platinum_searcher

A code search tool similar to ack and the_silver_searcher(ag). It supports multi platforms and multi encodings.
MIT License
2.81k stars 142 forks source link

a path with trailing slash results doubled slash path #209

Open ichihara-3 opened 4 years ago

ichihara-3 commented 4 years ago

When the path with a trailing slash like path/to/dir/ is set to the PATH argument, the file paths in the result become doubled slash paths like path/to/dir//found/file.txt.

It would be good to clean the paths.

example::

$ tree
.
└── examples
    ├── a
    │   └── A.txt
    ├── b
    │   └── B.txt
    └── c

4 directories, 2 files
$ pt hello examples/
examples//a/A.txt
1:hello

examples//b/B.txt
1:hello world