1

fixes for windoze

This commit is contained in:
Alex Yatskov 2016-12-29 11:04:48 -08:00
parent 055d0e4818
commit 354fc32608

View File

@ -69,14 +69,20 @@ func epwingExportDb(inputPath, outputDir, title string, stride int, pretty bool)
var data []byte var data []byte
if stat.IsDir() { if stat.IsDir() {
toolPath := filepath.Join( toolPath := filepath.Join(
filepath.Dir(os.Args[0]),
"bin", "bin",
runtime.GOOS, runtime.GOOS,
"zero-epwing", "zero-epwing",
) )
_, err := os.Stat(toolPath) if runtime.GOOS == "windows" {
if err != nil { toolPath += ".exe"
}
if toolPath, err = filepath.Abs(toolPath); err != nil {
return err
}
if _, err = os.Stat(toolPath); err != nil {
return fmt.Errorf("failed to find zero-epwing in '%s'", toolPath) return fmt.Errorf("failed to find zero-epwing in '%s'", toolPath)
} }