Skip to content

Commit ff873c9

Browse files
committed
Fix #16
1 parent 2e6b58c commit ff873c9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

discovery_windows.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ func (s *PHPStore) addFromPath() {
7272
}
7373

7474
func systemDir() string {
75-
cwd, err := os.Getwd()
76-
if err != nil {
75+
76+
val, ok := os.LookupEnv("SystemDrive")
77+
if !ok {
7778
return "C:\\"
7879
}
79-
return filepath.VolumeName(cwd) + "\\"
80+
81+
return val + string(os.PathSeparator)
8082
}
8183

8284
func userHomeDir() string {

0 commit comments

Comments
 (0)