Skip to content


Subversion checkout URL

You can clone with
Download ZIP


File::Next screws up UNC paths #2

petdance opened this Issue · 2 comments

2 participants


When you do

ack foo \hostname\some\path

you get

"ack: \hostname\some\path: No such file or directory"

The problem is in File::Next::reslash(): What happens is that something like "//server/share/directory" gets split into (q<>, q<>, 'share', 'directory'), and File::Spec->catfile() only returns a single slash at the front, which is wrong. Why is this being done? If I specify "//server/share/directory", I really want to use the path "//server/share/directory" and not "/server/share/directory", which won't work.


The trouble is that File::Spec->catfile() combines any number of empty sub paths to one /
(as I am sure you have noticed).

I wonder if we should use a regexp to change \ to /
(or would that break other things)


If we do go down that road, we would use the reslash() function that is already in File::Next and used throughout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.