-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pake_replace_regexp_to_dir fails if passed absolute file name and empty path #42
Comments
hm… and what is the case for calling if there is a legitimate usecase — I'll figure out solution. otherwise, I can apply stricter error-checks |
To be honest, I was just testing a workaround to a problem I have :-) Here's the deal.
Since Pake 1.7.2, this does not work any more, and I have to use instead:
But that does not seem to work either, at least when on Windows and using my code (which at the top-level uses all paths/filenames with forwards slashes, trying to be compatible with both win and unix). I'm gonna send 2 pull requests for that btw |
so… strictly speaking, that is a bit of an edge-case from the pake-style approach point of view. relative paths are better, but best option is to pass pakeFinder object to that's one of the things which has to be implemented cleanly in pake2 :) |
I agree that this should be cleaned up a bit, but especially documented. As of now, there are various pake_xxx functions which take a "filelist", "path" as arguments, and nowhere it was stated what is supported for input.
|
it's a bit more complicated, as we also have absolute-paths will work for in-place replacement ( also, there is a weird use-case when some of paths in array are relative and some are absolute… :-/ |
in line 293 of pake_function.php:
$content = pake_read_file($src_dir.'/'.$file);
we should prepend $src_dir . DIRECTORY_SPERARATOR only when $src_dir is not empty. Otherwise we get an error on windows: /C:/a/file/path
The text was updated successfully, but these errors were encountered: