Skip to content
Snippets Groups Projects
Commit 6076f2c8 authored by DaveD's avatar DaveD
Browse files

Prevent broken paths on windows

parent ed5286b5
No related branches found
No related tags found
No related merge requests found
......@@ -220,8 +220,8 @@ abstract class AbstractAssetRule implements AssetRuleInterface {
* PHP-encoded expression for $path, relative to a `$baseDir` variable
*/
protected function exportPath($path, $cwd = NULL) {
// FIXME Windows, but don't add dep-hell
$isAbsolute = $path{0} === '/';
// This should work for both unix and windows
$isAbsolute = ($path{0} === '/' || $path{1} === ':');
if (!$isAbsolute) {
return '$baseDir . ' . var_export('/' . $path, 1);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment