| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cff1e72 commit 53b7b8e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,7 @@ | |||
| 7 | 7 | package py | |
| 8 | 8 | ||
| 9 | 9 | import ( | |
| 10 | - "path" | ||
| 10 | + "path/filepath" | ||
| 11 | 11 | "strings" | |
| 12 | 12 | ) | |
| 13 | 13 | ||
@@ -101,14 +101,14 @@ func ImportModuleLevelObject(ctx Context, name string, globals, locals StringDic | |||
| 101 | 101 | ||
| 102 | 102 | // Convert import's dot separators into path seps | |
| 103 | 103 | parts := strings.Split(name, ".") | |
| 104 | - srcPathname := path.Join(parts...) | ||
| 104 | + srcPathname := filepath.Join(parts...) | ||
| 105 | 105 | ||
| 106 | 106 | opts := CompileOpts{ | |
| 107 | 107 | UseSysPaths: true, | |
| 108 | 108 | } | |
| 109 | 109 | ||
| 110 | 110 | if fromFile, ok := globals["__file__"]; ok { | |
| 111 | - opts.CurDir = path.Dir(string(fromFile.(String))) | ||
| 111 | + opts.CurDir = filepath.Dir(string(fromFile.(String))) | ||
| 112 | 112 | } | |
| 113 | 113 | ||
| 114 | 114 | module, err := RunFile(ctx, srcPathname, opts, name) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments