larapack / hooks

Hooks is a extension system for your Laravel application.
https://larapack.io
MIT License
218 stars 15 forks source link

Support Windows directory separator #37

Closed marktopper closed 6 years ago

marktopper commented 6 years ago

Thanks to @emptynick for reporting this issue.

fletch3555 commented 6 years ago

A little late since this is already merged, but doesn't PHP have a constant that holds the current environment's directory separator? You could simplify it and use that

marktopper commented 6 years ago

Properly a good idea @fletch3555. 👍

emptynick commented 6 years ago

It does, but $path holds something like \hooks/test-hook/resources\assets\scripts\alert.js in my case.

fletch3555 commented 6 years ago

Yeah, I had a feeling that might be the case. But $file->getRelativePath() shouldn't do that... I think it should always return a valid path using on your current file system separator. Might be worth digging into that and reporting it on the repo for whatever that's coming from (Flysystem?)