File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import (
1818 "regexp"
1919 "strconv"
2020 "strings"
21+ "runtime"
2122)
2223
2324const (
@@ -28,7 +29,11 @@ const (
2829
2930var (
3031 regexpPhpFile = regexp .MustCompile (`(?://)?(/[^ ]*\.php)` )
31- regexpFilename = regexp .MustCompile (`filename=["]?file://(\S+)/Data/Temporary/.+?/Cache/Code/Flow_Object_Classes/([^"]*)\.php` )
32+ if runtime.GOOS = = "windows" {
33+ regexpFilename = regexp .MustCompile (`filename=["]?file:///(\S+)/Data/Temporary/.+?/Cache/Code/Flow_Object_Classes/([^"]*)\.php` )
34+ } else
35+ regexpFilename = regexp .MustCompile (`filename=["]?file://(\S+)/Data/Temporary/.+?/Cache/Code/Flow_Object_Classes/([^"]*)\.php` )
36+ }
3237 regexpPathAndFilename = regexp .MustCompile (`(?m)^# PathAndFilename: (.*)$` )
3338 regexpPackageClass = regexp .MustCompile (`(.*?)/Packages/[^/]*/(.*?)/Classes/(.*).php` )
3439 regexpDot = regexp .MustCompile (`[\./]` )
@@ -78,6 +83,9 @@ func (p *PathMapper) doTextPathMapping(message []byte) []byte {
7883 var processedMapping = map [string ]string {}
7984 for _ , match := range regexpPhpFile .FindAllStringSubmatch (string (message ), - 1 ) {
8085 originalPath := match [1 ]
86+ if runtime .GOOS == "windows" {
87+ originalPath = strings .Replace (originalPath ,"//" ,"" , 1 )
88+ }
8189 path := p .mapPath (originalPath )
8290 p .logger .Debug ("doTextPathMapping %s >>> %s" , path , originalPath )
8391 processedMapping [path ] = originalPath
You can’t perform that action at this time.
0 commit comments