Platformsh\Cli\Helper\FilesystemHelper::fixTarPath PHP Method

fixTarPath() protected method

Fix a path so that it can be used with tar on Windows.
See also: http://betterlogic.com/roger/2009/01/tar-woes-with-windows/
protected fixTarPath ( string $path ) : string
$path string
return string
    protected function fixTarPath($path)
    {
        if ($this->isWindows()) {
            $path = preg_replace_callback('#^([A-Z]):/#i', function (array $matches) {
                return '/' . strtolower($matches[1]) . '/';
            }, str_replace('\\', '/', $path));
        }
        return $path;
    }