Skip to content

Commit

Permalink
Merge pull request 99designs#127 from jon-walton/windows-path-slash
Browse files Browse the repository at this point in the history
convert windows input path separators to slash
  • Loading branch information
vektah authored Jun 6, 2018
2 parents 618fc8a + ae36253 commit 27e61b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions codegen/codegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (cfg *Config) normalize() error {
return errors.New("ModelFilename is required")
}
cfg.ModelFilename = abs(cfg.ModelFilename)
cfg.modelDir = filepath.Dir(cfg.ModelFilename)
cfg.modelDir = filepath.ToSlash(filepath.Dir(cfg.ModelFilename))
if cfg.ModelPackageName == "" {
cfg.ModelPackageName = filepath.Base(cfg.modelDir)
}
Expand All @@ -100,7 +100,7 @@ func (cfg *Config) normalize() error {
return errors.New("ModelFilename is required")
}
cfg.ExecFilename = abs(cfg.ExecFilename)
cfg.execDir = filepath.Dir(cfg.ExecFilename)
cfg.execDir = filepath.ToSlash(filepath.Dir(cfg.ExecFilename))
if cfg.ExecPackageName == "" {
cfg.ExecPackageName = filepath.Base(cfg.execDir)
}
Expand Down Expand Up @@ -141,7 +141,7 @@ func abs(path string) string {
if err != nil {
panic(err)
}
return absPath
return filepath.ToSlash(absPath)
}

func fullPackageName(dir string, pkgName string) string {
Expand Down

0 comments on commit 27e61b8

Please sign in to comment.